Ubuntu MySQL encoding settings after 5.5

Source: Internet
Author: User

MySQL was installed.

Version: 5.5.28 OS: Ubuntu 12.10
' character% ' ; +--------------------------+----------------------------+| Variable_name            | Value                      |+--------------------------+----------------------------+| character_set_client     | UTF8                       | | character_set_connection | UTF8                       | | character_set_database   | latin1                     | | character_set_filesystem | binary                     | | character_set_ Results |    UTF8 |                       | character_set_server     | latin1                     | | character_set_system     | UTF8                       | | Character_sets_dir       

Create a table to view the format that is latin1, modify/etc/my.cnf add: [Client]default-character-set=utf8[mysqld]Default-character-set=utf8/etc/init.d/mysql restart #启动不了了. later the original version changed from 5, need to change this
[client]default-character-set=utf8[mysqld]character-set-server=utf8/etc/init.d/mysql restart  #启动成功mysql > Show variables like ' character% '; +--------------------------+----------------------------+| Variable_name            | Value                      |+--------------------------+----------------------------+| character_set_client     | UTF8                       | | character_set_connection | UTF8                       | | character_set_database   | UTF8                       | | character_set_filesystem | binary                     | | character_set_results    | UTF8                       | | Character_set_server |     UTF8 |                       | character_set_system     | UTF8                       | | character_sets_dir       |/usr/ share/mysql/charsets/|+--------------------------+----------------------------+

The modification was successful.

Ubuntu MySQL encoding settings after 5.5

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.