{"id":12696,"date":"2022-10-03T15:46:48","date_gmt":"2022-10-03T19:46:48","guid":{"rendered":"http:\/\/local.brightwhiz\/?post_type=snippets&p=12696"},"modified":"2022-10-03T15:46:51","modified_gmt":"2022-10-03T19:46:51","slug":"how-to-get-mysql-db-size-sql","status":"publish","type":"snippets","link":"http:\/\/local.brightwhiz\/snippets\/how-to-get-mysql-db-size-sql\/","title":{"rendered":"How to get the MySQL Db Size in SQL"},"content":{"rendered":"\n
Use this to get MySQL Db size:<\/p>\n\n\n\n
SELECT table_schema "DB Name",\n ROUND(SUM(data_length + index_length) \/ 1024 \/ 1024, 1) "DB Size in MB" \nFROM information_schema.tables \nGROUP BY table_schema; <\/code><\/pre>\n","protected":false},"comment_status":"open","ping_status":"closed","template":"","meta":[],"categories":[953,23,27,15,28,16],"tags":[180,393,424,433,449,471,544,549],"yoast_head":"\nHow to get the MySQL Db Size in SQL [Snippet]<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\n