三步解决MySQL中文乱码问题
1、进入CMD,连接上MySQL,分别执行以下指令(前提必须将MySQL安装路径配置到系统Path环境变量中)
show variables like "%char%"; SET character_set_client='utf8'; SET character_set_connection='utf8'; SET character_set_results='utf8'; show variables like "%char%";
2、进入MySQL安装路径,找到my.ini,添加如下配置
[mysqld] character-set-server=utf8
[client] default-character-set=utf8
[mysql] default-character-set=utf8