To know the size of each database, follow these steps: 1. Enter the information_schema database (which stores information about other databases) useinformation_schema; 2. query the size of all data: selectconcat (round (sum (data_length10241024), 2), MB) asdatafromtables; 3. view the specified
To know the size of each database, follow these steps: 1. Enter the information_schema database (where information about other databases is stored) use information_schema; 2. query the size of all data: select concat (round (sum (data_length/1024/1024), 2), 'mb') as data from tables; 3. view the specified
To know the size of each database, follow these steps:
1. Enter the information_schema database (storing information about other databases)
Use information_schema;
2. query the size of all data:
Select concat (round (sum (data_length/1024/1024), 2), 'mb') as data from tables;
3. view the size of the specified database:
For example, you can view the size of the Database home.
Select concat (round (sum (data_length/1024/1024), 2), 'mb') as data from tables where table_schema = 'home ';
4. view the size of a table in the specified database
For example, you can view the size of the members table in the Database home.
Select concat (round (sum (data_length/1024/1024), 2), 'mb') as data from tables where table_schema = 'Home' and table_name = 'members ';
Detailed source reference: http://www.frostsky.com/2011/08/mysql-query-size/