1:查看指定数据库大小
mysql>use information_schema;
mysql> select concat(round(sum(data_length/1024/1024),2),'MB') as data from tables where table_schema='db_name';
+----------+
| data |
+----------+
| 980.47MB |
+----------+
2:导出数据库
]$ mysqldump -u root -p db_name > ./db_name.sql