Last active
August 29, 2015 14:04
-
-
Save hykw/bb0a1d034b648c275643 to your computer and use it in GitHub Desktop.
MySQL: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/etc/my.cnf | |
------------------------- | |
default-character-set=utf8 | |
character-set-server = utf8 | |
collation-server=utf8_general_ci | |
init_connect='SET collation_database = utf8_general_ci; SET collation_connection = utf8_general_ci' | |
skip-character-set-client-handshake | |
------------------------- | |
mysql> ALTER DATABASE db CHARACTER SET utf8 COLLATE utf8_general_ci | |
mysql> ALTER TABLE table CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment