my.ini中配置:
[client]
default-character-set=utf8[mysql]
default-character-set=utf8[mysqld]
character-set-server=utf8
collation-server=utf8_general_ci #字符排序规则
skip-character-set-client-handshake #忽略客户端编码设置,强制客户端和服务端编码一致
配置后重启mysql服务
my.ini中配置:
[client]
default-character-set=utf8[mysql]
default-character-set=utf8[mysqld]
character-set-server=utf8
collation-server=utf8_general_ci #字符排序规则
skip-character-set-client-handshake #忽略客户端编码设置,强制客户端和服务端编码一致
配置后重启mysql服务