Data Base Size in MB from Information Schema

Get Data Base Size in MB from Information Schema in mysql
copy
9
1
Data Base Size in MB from Information SchemaSELECT table_schema "Data Base Name", SUM( data_length + index_length) / 1024 / 1024 "Data Base Size in MB" FROM information_schema.TABLES GROUP BY table_schema;Get Data Base Size in MB from Information Schema in mysql

4 years, 9 months ago ShahidMahmud 3 |

Result:

+--------------------------+----------------------+
| Data Base Name           | Data Base Size in MB |
+--------------------------+----------------------+
| database1                |           0.94388580 |
| database-info-2          |         158.65607834 |
+--------------------------+----------------------+
2 rows in set (0.10 sec)