Linux Mint under the Mysql Chinese support problem _mysql

Source: Internet
Author: User
Tags mysql in linux mint

A. MySQL does not support Chinese by default, and its server and DB defaults to latin1 encoding. So we're going to change it to Utf-8 code, because utf-8 contains the binary encoding of most languages on the planet.

1. Turn off MySQL service

Sudo/etc/init.d/mysql stop

2. Modify MySQL configuration file

The MySQL profile defaults to the/ETC/MY.CNF or/etc/mysql/my.cnf directory and goes to the command line

sudo gedit/etc/mysql/my.cnf

Add default-character-set = UTF8 under [client]
Add character-set-server = UTF8 under [mysqld]

3. Restart MySQL OK

Sudo/etc/init.d/mysql start

PS: Some commands for operating MySQL in INIT.D startup management:

/etc/init.d/mysql Start|stop|restart|reload|force-reload|status

Important point: Be sure to follow the above method step-by-step implementation, the most important thing is to shut down the service before modifying the file, remember!!!

The above content is small to introduce the Linux Mint under the MySQL Chinese support problem, I hope you like.

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.