导出数据库中所有的数据
mysqldump -uUserName -pPassword DatabaseName>FileName.sql
导出数据库中所有表的结构
mysqldump -uUserName -pPassword -d DatabaseName>FileName.sql
导出数据库中指定表的结构
mysqldump -uUserName -pPassword -d DatabaseName TableName>FileName.sql
导出数据库中指定表的部分数据
mysqldump -uUserName -pPassword DatabaseName TableName --where="condition">FileName.sql
导入数据
mysql>source path
导出到excel
mysql>SELECT * INTO OUTFILE './test.xls' FROM TableName WHERE 1 ORDER BY ColumnName DESC LIMIT 0, 50;
来源:https://www.cnblogs.com/fengjunkuan/archive/2013/01/29/2881102.html