Advertisement
Neo-Craft

MySQL query to get MB database size

Jun 16th, 2014
528
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 1.38 KB | None | 0 0
  1. mysql> SELECT table_schema AS "Database name", SUM(data_length + index_length) / 1024 / 1024 AS "Size (MB)" FROM information_schema.TABLES GROUP BY table_schema;
  2. +--------------------+---------------+
  3. | Database name      | Size (MB)     |
  4. +--------------------+---------------+
  5. | artefact2          | 496.12054348  |
  6. | artefact3          | 598.33867168  |
  7. | artefact_f         | 94.52951336   |
  8. | destiny_others     | 219.12989616  |
  9. | destiny_static     | 36.59243774   |
  10. | elementum          | 44.02074909   |
  11. | exfofo_new         | 324.05191994  |
  12. | exodia             | 143.87036991  |
  13. | exodiaforum        | 16.69764900   |
  14. | exodiav3           | 38.35345650   |
  15. | exodiav3_new       | 1204.82202625 |
  16. | exodiav4           | 1328.95080185 |
  17. | exodia_back        | 915.27945518  |
  18. | exodia_backup09_08 | 431.13183022  |
  19. | GpsGateServer      | 6.28125000    |
  20. | information_schema | 0.00878906    |
  21. | ipb_perfect        | 51.29153919   |
  22. | jokerforum         | 322.09955311  |
  23. | jokers             | 105.20970249  |
  24. | jokersv2           | 97.17121506   |
  25. | mysql              | 0.64280987    |
  26. | nakama             | 409.42668247  |
  27. | nakama_old         | 42.93450928   |
  28. | oceanv3            | 51.03539085   |
  29. | rpc_wp_bot         | 4.22454834    |
  30. | test               | 36.27725220   |
  31. | testt              | 653.46888542  |
  32. +--------------------+---------------+
  33. 27 rows in set
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement