mysql -uroot -p
use testdb
show create tables testtable;
DEFAULT CHARSET=latin1
如果直接mysqldump -uroot -ptest123 testdb >testdb.sql
导出来的中文是乱码,需用以下命令导出,中文才正常显示
mysqldump -uroot -ptest123 –default-character-set=latin1 testdb >testdb.sql
导出来的文件要以ANSI编码查看,可以用notepad++转换为utf8