In mac, the default mysql character set is utf8.

Source: Internet
Author: User
Modify the default Character Set of mysql in mac to utf81. under usrlocalmysqlsupport-files [directory varies from person to person], find the following file my-huge.cnfmy-large.cnfmy-small.cnf... this is the configuration file template. copy it to etcmy. cnf, you can use this configuration file 2. add: default-character-se to the [client] Section

Modify the default Character Set of mysql in mac to utf8 1. under/usr/local/mysql/support-files [directories vary from person to person], find the following file my-huge.cnf my-large.cnf my-small.cnf... this is the configuration file template, copy to/etc/my. cnf, you can use this configuration file 2. add: default-character-se to the [client] Section

Modify mysql's default character set to utf8 in mac
1. Under/usr/local/mysql/support-files, find the following files:
My-huge.cnf
My-large.cnf
My-small.cnf
...
This is the configuration file template. copy it to/etc/my. cnf and you can use this configuration file.

2. Add the following content to the [client] section:
Default-character-set = utf8
In the [mysqld] section, add:
Character-set-server = utf8

Restart the server and start mysql
Show variables like 'character _ set _ % ';
The following results should be displayed:
+ -------------------------- + --------------------------------------------------------------- +
| 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/local/mysql-5.0.51a-osx10.4-i686/share/mysql/charsets/|
+ -------------------------- + --------------------------------------------------------------- +

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.