If you want to find how much your database size in MySQL, you can run this command in mysql console:

If you want the output in MB’s:
mysql> SELECT table_schema “database”, sum(data_length + index_length)/1024/1024 “size in MB” FROM information_schema.TABLES GROUP BY table_schema;

If you want the output in GB’s:
mysql> SELECT table_schema “database”, sum(data_length + index_length)/1024/1024/1024 “size in GB” FROM information_schema.TABLES GROUP BY table_schema;

If you want to view specific database size in GB’s:
mysql> SELECT table_schema “database”, sum(data_length + index_length)/1024/1024/1024 “size in GB” FROM information_schema.TABLES WHERE table_schema=’test3′ GROUP BY table_schema;

By zam

Related Post

Any Comments?

This site uses Akismet to reduce spam. Learn how your comment data is processed.