0

How to know database size if you’re using InnoDB

Posted febrero 15th, 2012 in Blog, DataBases and tagged by Gastón Acosta Ramas

if you’re using MyISAM engine and want to know the size of your database,  you can get this info by running a simple du for the /var/lib/mysql directory

here you can easily read the size of each database.

BUT, if you’re using InnoDB engine, specially if you have innodb_file_per_table setted on, the “du method” doesn’t work. So you can run this.

if you want specific databse size, or if you want all tables sizes from specific dbase, you can run this.

obviously you need to replace ‘DB’ with your db name, e.g ‘wordpress_1′
if you want all databases sizes, you should run:

Leave a Reply