Change the default Character Set of MySQL under Ubuntu11.10

Source: Internet
Author: User


In Ubuntu11.10, the default Character Set of MySQL is changed because I installed mysql in sudo apt-get install Mysql-server mode. By default, the mysql character set is still latin1, therefore, you must replace it with the utf8 character set. Modify/etc/mysql/my. cnf file www.2cto.com 1 sudo gedit/etc/mysql/my. after cnf is enabled, add default-character-set = utf8 under [clinet] and add default-character-set = utf8 under [mysqld]. Then restart mysql 1 sudo/etc/init. d/mysql restart. Then let's check the changed character set 1 in mysql. Open the terminal mysql-u root-p2 show variables like 'character _ set _ % '; 3 show variables like 'collation _ % '; Author: Guan lingyu

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.