Check MySQL Size in Linux

I wanted to check the amount of diskspace that my database engine (MySQL) was utilizing on one of my VPS. Now for those of you who don’t know yet, you need to check out /var/lib/mysql folder for that. The total size of those files is the total amount of disk space that your MySQL is utilizing.

To find out the size of /var/lib/mysql folder just open Putty and issue the following command :

du -ch /var/lib/mysql | grep total

Check the last line (if there is only one, then refer that) to find out the size of that particular folder.

 

Leave a Reply

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