As I know, there are two ways to calculate the MySQL database size:
First one:
1 | du -shc /var/lib/mysql/* |
Second one:
1 | SELECT table_schema ,SUM( data_length + index_length) / 1024 / 1024 "Data Base Size in MB" FROM information_schema.TABLES GROUP BY table_schema; |