- SELECT
- table_schema AS 'Db Name',
- ROUND( SUM( data_length + index_length ) / 1024 / 1024, 3 ) AS 'Db Size (MB)',
- ROUND( SUM( data_free ) / 1024 / 1024, 3 ) AS 'Free Space (MB)'
- FROM information_schema.tables
- GROUP BY table_schema ;
转载请注明:谷谷点程序 » mysql用命令查看数据库的大小