GeeK`s Lifez GeeK`s Lifez

2Oct/102

How to know the size of Mysql’s databases

This is a little command which permit to know the size of all your mysql's databases:

First connect you to your mysql server as root:

# mysql - u root -p

Then use the following request:

mysql> select table_schema as BDD,round(sum(data_length+index_length)/1024/1024,2) as 'Size(MB)' from information_schema.tables group by table_schema;
+---------------------+----------+
| BDD                 | Size(MB) |
+---------------------+----------+
| database1  |    24.88 |
| information_schema  |     0.00 |
| mysql               |     0.51 |
+---------------------+----------+
3 rows in set (0.30 sec)
This command could be usefull when you want to prevent mysql's backup size.
Tagged as: 2 Comments
27Mar/081

MySQL root password reinitialisation ?

Qui n'a jamais eu besoin de pouvoir changer son mot de passe root sans connaître le mot de passe initiale..