mysql -e "SELECT table_schema AS 'Database Name', SUM((data_length+index_length)/1024/1024) AS 'Database Size in MB'
FROM information_schema.TABLES where table_schema='dbname';"
EXAMPLE
mysql -e "SELECT table_schema AS 'Database Name', SUM((data_length+index_length)/1024/1024) AS 'Database Size in MB'
FROM information_schema.TABLES where table_schema='employee';"
ANSWER
+---------------+---------------------+
| Database Name | Database Size in MB |
+---------------+---------------------+
| employee | 7224.01562500 |
+---------------+---------------------+