--MySQL DB 생성 CREATE DATABASE mydb CHARACTER SET utf8 COLLATE utf8_bin; grant all privileges on mydb .* to 'user'@'localhost' IDENTIFIED BY 'userPwd';
Character Set
Collation
- http://en.wikipedia.org/wiki/Collation
- http://stackoverflow.com/questions/5526334/what-effects-does-using-a-binary-collation-have
- http://stackoverflow.com/questions/2344118/utf-8-general-bin-unicode
MySQL 의 Collation 확인
mysql> SHOW COLLATION WHERE `Default` = 'Yes' and Collation like 'utf%'; +--------------------+---------+----+---------+----------+---------+ | Collation | Charset | Id | Default | Compiled | Sortlen | +--------------------+---------+----+---------+----------+---------+ | utf8_general_ci | utf8 | 33 | Yes | Yes | 1 | | utf8mb4_general_ci | utf8mb4 | 45 | Yes | Yes | 1 | | utf16_general_ci | utf16 | 54 | Yes | Yes | 1 | | utf16le_general_ci | utf16le | 56 | Yes | Yes | 1 | | utf32_general_ci | utf32 | 60 | Yes | Yes | 1 | +--------------------+---------+----+---------+----------+---------+ 5 rows in set (0.00 sec)