How to Get True Size of MySQL Database?

前端 未结 10 873
南笙
南笙 2020-12-02 04:35

I would like to know how much space does my MySQL database use, in order to select a web host. I found the command SHOW TABLE STATUS LIKE \'table_name\' so when

10条回答
  •  一生所求
    2020-12-02 04:53

    if you want to find it in MB do this

    SELECT table_schema                                        "DB Name", 
       Round(Sum(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB" 
    FROM   information_schema.tables 
    GROUP  BY table_schema; 
    

提交回复
热议问题