mysql數(shù)據(jù)庫(kù)空間滿了 如何知道m(xù)ysql數(shù)據(jù)庫(kù)的剩余空間?
如何知道m(xù)ysql數(shù)據(jù)庫(kù)的剩余空間?1、進(jìn)入information_schema數(shù)據(jù)庫(kù)(存放了其他的數(shù)據(jù)庫(kù)的信息)useinformation_schema2、查詢所有數(shù)據(jù)的大小:selectconc
如何知道m(xù)ysql數(shù)據(jù)庫(kù)的剩余空間?
1、進(jìn)入information_schema數(shù)據(jù)庫(kù)(存放了其他的數(shù)據(jù)庫(kù)的信息)
useinformation_schema
2、查詢所有數(shù)據(jù)的大?。?/p>
selectconcat(round(sum(data_length/1024/1024),2),"mb")asdatafromtables
3、查看指定數(shù)據(jù)庫(kù)的大?。?/p>
比如查看數(shù)據(jù)庫(kù)home的大小
selectconcat(round(sum(data_length/1024/1024),2),"mb")asdatafromtableswheretable_schema="home"
4、查看指定數(shù)據(jù)庫(kù)的某個(gè)表的大小
比如查看數(shù)據(jù)庫(kù)home中members表的大小
selectconcat(round(sum(data_length/1024/1024),2),"mb")asdatafromtableswheretable_schema="home"andtable_name="members"