Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save erycamel/ef19ce144063c1dce52210a793a0ebda to your computer and use it in GitHub Desktop.
Save erycamel/ef19ce144063c1dce52210a793a0ebda to your computer and use it in GitHub Desktop.
Changing the default character set to UTF-8
To change the default character set from latin1 to UTF-8, the following settings should be specified in the my.cnf configuration file.
[client]
...
default-character-set=utf8
...
[mysql]
...
default-character-set=utf8
...
[mysqld]
...
collation-server = utf8_unicode_ci
init-connect='SET NAMES utf8'
character-set-server = utf8
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment