useinformation_schema
2、查询所有数据的大小
selectconcat(round(sum(data_length/1024/1024),2),’mb’)asdatafromtables
3、查看指定数据库的大小
比如说数据库apoyl
selectconcat(round(sum(data_length/1024/1024),2),’mb’)asdatafromtableswheretable_schema=’apoyl’;
4、查看指定数据库的表的大小
比如说数据库apoyl中apoyl_test表
selectconcat(round(sum(data_length/1024/1024),2),’mb’)asdatafromtableswheretable_schema=’apoyl’andtable_name=’apoyl_test’;
整完了,有兴趣的可以试哈哦!挺使用哈
网站找的,都是正解