This article draws on a number of tutorials already available here to do a grooming
The Chinese configuration reference on the server: http://blog.csdn.net/typa01_kk/article/details/49192245
MySQL Configuration Chinese reference: http://www.linuxidc.com/Linux/2014-10/108610.htm
Install Chinese support
Yum-y Group Install Chinese-support
Input locale-a
Show this and the installation is successful.
Modifying a character encoding configuration file
The original
lang="en_US. UTF-8" sysfont="latarcyrheb-sun16"
Modified into
lang="Zh_cn.utf8″ sysfont="latarcyrheb-sun16"
This will set up CentOS's Chinese.
You can view the configuration with the Echo $LANG
Next, this system configuration file:/etc/profile
Vim/etc/profile
Add to the last line of code
Export lc_all="zh_cn.utf8"
Bloggers use Xshell in the file-Properties-terminal to change to Utf-8
Do the above configuration server and terminal display should be able to become Chinese
Next configure the MySQL encoding
Vi/etc/my.cnf
Encode the area block under the original code
[client] #password=Your_passworddefault-character-Set=UTF8 #我加入的port=3306Socket=/tmp/Mysql.sock[Mysqld]default-character-Set=UTF8 #我加入的
Character_set_server=UTF8 #我加入的server-id =1Log-bin=master-Binlog-bin-index = master-Bin.index[MySQL]default-character-Set=UTF8 #我加入的
Save changes
Service mysqld Restart
MySQL is also configured to complete the
Linux in Chinese garbled and MySQL garbled configuration