hunostor

Get databse file size

Dec 5th, 2019
6,293
0
Never
2
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.30 KB | None | 0 0
  1. https://tableplus.com/blog/2018/08/mysql-how-to-get-the-size-of-mysql-database.html
  2.  
  3. SELECT
  4.     table_schema AS 'DB Name',
  5.     ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) AS 'DB Size in MB'
  6. FROM
  7.     information_schema.tables
  8. WHERE
  9.     table_schema = 'db_name'
  10. GROUP BY
  11.     table_schema;
Advertisement
Comments
  • User was banned
  • User was banned
Add Comment
Please, Sign In to add comment