Skip to content

Instantly share code, notes, and snippets.

@kalbasit
Created May 25, 2013 03:41
Show Gist options
  • Save kalbasit/5647808 to your computer and use it in GitHub Desktop.
Save kalbasit/5647808 to your computer and use it in GitHub Desktop.
Mysql UTF8 utf8_unicode_ci Patch
diff -Naur a/my.cnf b/my.cnf
--- a/my.cnf 2013-05-24 15:56:51.311075819 -0700
+++ b/my.cnf 2013-05-24 20:39:26.679062359 -0700
@@ -19,6 +19,7 @@
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
+default-character-set = utf8
# Here is entries for some specific programs
# The following values assume you have at least 32M ram
@@ -42,6 +43,12 @@
lc-messages-dir = /usr/share/mysql
skip-external-locking
+init_connect = 'SET NAMES utf8'
+character-set-server = utf8
+collation-server = utf8_unicode_ci
+skip-character-set-client-handshake
+init_connect = 'SET collation_connection = utf8_unicode_ci'
+
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
@@ -117,6 +124,7 @@
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
+default-character-set = utf8
[isamchk]
key_buffer = 16M
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment