Linux in Chinese garbled and MySQL garbled configuration

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.