mysql source导入中文乱码

mysql -u root -p –default-character-set=utf8 

 

or 修改my.cnf

[client]
default-character-set=utf8

[mysql]
default-character-set=utf8


[mysqld]
collation-server = utf8_unicode_ci
init-connect='SET NAMES utf8'
character-set-server = utf8

Leave a Reply

Your email address will not be published. Required fields are marked *