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
3、重启MySQL服务即可
原文地址:https://www.cnblogs.com/rhyheart/p/10493588.html
时间: 2024-10-14 14:53:55