[Author]: kwu
解决Mysql字符集问题
1、 vi /etc/my.cnf 增加以下内容
- [client]
- port=3306
- socket=/var/lib/mysql/mysql.sock
- default-character-set=utf8
- [mysql]
- no-auto-rehash
- default-character-set=utf8
- [mysqld]
- port=3306
- default-character-set=utf8
2、重启mysql生效
- service mysqld restart
3、查看mysql的字符集
- show variables like 'character_set%'