---
title: "Discussion on \"MySQL - How to get database sizes\" | Hashnode"
description: "Discussion on \"MySQL - How to get database sizes\". MySQL provides metadata of the database itself, basically just run this on your query. Don't forget to replace database name with yourown database name.\nSELECT\n  TABLE_NAME AS `Table`,\n  ROUND((DATA_LENGTH + INDEX_LENGTH) / 1024 / 1024) AS `Size (MB)..."
url: "https://hashnode.com/posts/mysql-how-to-get-database-sizes/62b13adbc0f84f6b540d261c"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [MySQL - How to get database sizes](https://fiko.me/mysql-how-to-get-database-sizes?utm_source=hashnode&utm_medium=feed)

MySQL provides metadata of the database itself, basically just run this on your query. Don't forget to replace database name with yourown database name. SELECT TABLE\_NAME AS \`Table\`, ROUND((DATA\_LENGTH + INDEX\_LENGTH) / 1024 / 1024) AS \`Size (MB)...

Jun 21, 2022 · 1 min read · fiko.me  
Updated Sep 27, 2023  
Read the article

-   [#mysql](https://hashnode.com/tag/mysql)

## Written by

[Fiko Borizqy](https://hashnode.com/@fikoborizqy)

@fikoborizqy · Yogyakarta, Indonesia

  
[View profile](https://hashnode.com/@fikoborizqy)

Magento 2 Developer

I wrote these tutorials for myself in future when I forget for the next steps.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
