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/|
+ -------------------------- + --------------------------------------------------------------- +