mysql数据库空间满了 如何知道mysql数据库的剩余空间?
如何知道mysql数据库的剩余空间?1、进入information_schema数据库(存放了其他的数据库的信息)useinformation_schema2、查询所有数据的大小:selectconc
如何知道mysql数据库的剩余空间?
1、进入information_schema数据库(存放了其他的数据库的信息)
useinformation_schema
2、查询所有数据的大小:
selectconcat(round(sum(data_length/1024/1024),2),"mb")asdatafromtables
3、查看指定数据库的大小:
比如查看数据库home的大小
selectconcat(round(sum(data_length/1024/1024),2),"mb")asdatafromtableswheretable_schema="home"
4、查看指定数据库的某个表的大小
比如查看数据库home中members表的大小
selectconcat(round(sum(data_length/1024/1024),2),"mb")asdatafromtableswheretable_schema="home"andtable_name="members"