Difference between revisions of "Find the size of mysql database"

From MyWiki
Jump to: navigation, search
(Created page with "SELECT table_schema "Data Base Name", sum( data_length + index_length ) / 1024 / 1024 "Data Base Size in MB" FROM information_schema.TABLES GROUP BY table_schema ; <br>")
 
Line 1: Line 1:
 +
'''If you run the query which is given below in MySQL Query Browser then you will get the two columns first will display the Data Base Name and the second will display the Data Base Size in MB.''' <br>
 
SELECT table_schema "Data Base Name", sum( data_length + index_length ) / 1024 / 1024 "Data Base Size in MB"
 
SELECT table_schema "Data Base Name", sum( data_length + index_length ) / 1024 / 1024 "Data Base Size in MB"
 
FROM information_schema.TABLES GROUP BY table_schema ; <br>
 
FROM information_schema.TABLES GROUP BY table_schema ; <br>

Revision as of 08:14, 14 September 2015

If you run the query which is given below in MySQL Query Browser then you will get the two columns first will display the Data Base Name and the second will display the Data Base Size in MB.
SELECT table_schema "Data Base Name", sum( data_length + index_length ) / 1024 / 1024 "Data Base Size in MB" FROM information_schema.TABLES GROUP BY table_schema ;