How to find the size of a mysql database
I get this question all the time.
“How big is my mysql database?!”
It’s not always an easy answer, but this little bash foo seems to take care of it.
mysql -uusername -ppassword database -e 'show table status;' | \
awk '{sum=sum+$7+$9;} END {print sum/1024/1024}'
Gives you the database size in mb.
:)
0 Comments »
No comments yet.
RSS feed for comments on this post. TrackBack URI