Skip to content

Instantly share code, notes, and snippets.

@haio
Last active December 11, 2015 15:48
Show Gist options
  • Save haio/4623382 to your computer and use it in GitHub Desktop.
Save haio/4623382 to your computer and use it in GitHub Desktop.
设置mysql 5.5.29编码格式
mysql -uroot -p
show variables like "%char%";
exit
stop mysql
vi /etc/mysql/my.cnf
[mysqld]
collation-server = utf8_unicode_ci
init-connect='SET NAMES utf8'
character-set-server = utf8
default-character-set=utf8
[client]
default-character-set=utf8
start mysql
OK!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment