CREATE DATABASE `tpcms`DEFAULT CHARACTERSET utf8 COLLATE utf8_general_ci
ALTER DATABASE `zabbixdb` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
show variables like '%character%';
ci是 case insensitive, 即 "大小写不敏感", a 和 A 会在字符判断中会被当做一样的;
bin 是二进制, a 和 A 会别区别对待.
例如你运行:
SELECT * FROM table WHERE txt = 'a'
那么在utf8_bin中你就找不到 txt = 'A' 的那一行, 而 utf8_general_ci 则可以.