Get the database size from the mysql console

If you want to check the DB size before dump, login with mysql to the database and run:

  1.  
  2. SELECT table_schema "DB Name", sum( data_length + index_length ) / 1024 / 1024 "Data Base Size in MB"
  3. FROM information_schema.TABLES GROUP BY table_schema ;
  4.  

It would list all databases and their size in MB.

Thanks to the MySQL Forums for the tip.

Be Sociable, Share!
  • Twitter
  • Facebook
  • email
  • StumbleUpon
  • Delicious
  • Google Reader
  • LinkedIn
  • BlinkList
del.icio.us Digg DZone Facebook Google Google Reader Magnolia reddit SlashDot Technorati ReadMe.ru Dobavi.com Dao.bg Lubimi.com Ping.bg Pipe.bg Svejo.net Web-bg.com

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>