【解決】Mysql字符集問題

[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%'

You May Also Like