首先在windows平台下mysql用作导出数据库源。查看字符编码的系统变量:
代码如下:
mysql> show variables like ‘%char%'; +————————–+—————————-+ | Variable_name | Value | +————————–+—————————-+ | character_set_client | latin1 | | character_set_connection | latin1 | | character_set_database | latin1 | | character_set_filesystem | binary | | character_set_results | latin1 | | character_set_server | gbk | | character_set_system | utf8 | | character_sets_dir | D:mysqlsharecharsets | +————————–+—————————-+
查看character_set_database,这里是latin1,latin1是装不了多字节字符集的
然后在windows下设置系统变量为utf8 :
mysql>set character_set_database=utf8; ##设置默认的字符集为utf8
推荐:MySQL教程