Find database sizes in mysql
How to get MySQL / MariaDB db size:
mysql configurationintermediate
by MYSQL
14 views
How to get MySQL / MariaDB db size:
123456789101112131415161718192021222324
MariaDB [(none)]>
SELECT table_schema AS "Database", SUM(data_length + index_length) / 1024 / 1024 / 1024 AS "Size (GB)" FROM information_schema.TABLES GROUP BY table_schema;
+--------------------+----------------+
| Database | Size (GB) |
+--------------------+----------------+
| information_schema | 0.000198364258 |
| mysql | 0.002159118652 |
| performance_schema | 0.000000000000 |
| va | 0.000030517578 |
| vasu | 0.000061035156 |
+--------------------+----------------+
5 rows in set (1.564 sec)
MariaDB [(none)]>
SELECT table_schema AS "Database", SUM(data_length + index_length) / 1024 / 1024 AS "Size (MB)" FROM information_schema.TABLES GROUP BY table_schema;
+--------------------+------------+
| Database | Size (MB) |
+--------------------+------------+
| information_schema | 0.20312500 |
| mysql | 2.21093750 |
| performance_schema | 0.00000000 |
| va | 0.03125000 |
| vasu | 0.06250000 |
+--------------------+------------+
5 rows in set (0.345 sec)Please to add comments
No comments yet. Be the first to comment!