mysql> show variables like '%char%';
```sh mysql> show variables like '%char%';
在[mysqld],[mysql],[client]下分别添加如下内容 [mysqld] character_set_server = utf8 [mysql] default-character-set=utf8 [client] default-character-set=utf8 # 修改完成以后重启下MySQL就OK
在[mysqld],[mysql],[client]下分别添加如下内容
[mysqld]
character_set_server = utf8
[mysql]
default-character-set=utf8
[client]
default-character-set=utf8