Quantcast
Channel: mysql – PHP Web Developer
Viewing all articles
Browse latest Browse all 5

Mysql – Calculate database size

0
0

You can calculate MySql database size using following steps.

Login into mysql :

mysql -h hostname -u username -p

Above command will ask you to enter mysql password.
After log in into mysql, run following query.

SELECT table_schema "DatabaseName",
sum( data_length + index_length ) / 1024 / 1024
"DataBase Size in MB" FROM information_schema.TABLES
GROUP BY table_schema;

Just replace your Database name. Thats it.
Please leave your comments if it worked for you.


Filed under: MySql Tagged: mysql, MySql database size

Viewing all articles
Browse latest Browse all 5

Latest Images

Trending Articles





Latest Images