mysql默认字段值区分大小写:
character-set-server=utf8
collation-server=utf8_bin
init-connect="SET NAMES utf8;"
SELECT DEFAULT_CHARACTER_SET_NAME "charset", DEFAULT_COLLATION_NAME "collation"
FROM information_schema.SCHEMATA WHERE SCHEMA_NAME = "billing01";
SELECT DEFAULT_CHARACTER_SET_NAME "charset", DEFAULT_COLLATION_NAME "collation" ,SCHEMA_NAME
FROM information_schema.SCHEMATA;
mysql> SHOW CHARACTER SET LIKE "utf8";
+---------+---------------+-------------------+--------+
| Charset | Description | Default collation | Maxlen |
+---------+---------------+-------------------+--------+
| utf8 | UTF-8 Unicode | utf8_general_ci | 3 |
+---------+---------------+-------------------+--------+
1 row in set (0.00 sec)
https://blog.csdn.net/ghosind/article/details/83692869
mysql启动报错:
2019-10-29T08:52:41.945012+08:00 0 [ERROR] [MY-010936] [Server] COLLATION "utf8_bin" is not valid for CHARACTER SET "utf8mb4"
2019-10-29T08:52:41.946520+08:00 0 [ERROR] [MY-010119] [Server] Aborting
必须加character-set-server=utf8
my.cnf加
init_connect="SET collation_connection = utf8_bin"
也不行。
SHOW CHARACTER SET LIKE "utf8";
mysqld —-character-set-server=utf8mb4 —-collation-server=utf8mb4_bin
ALTER DATABASE database-name CHARACTER SET charset-name COLLATE collation-name;
ALTER DATABASE billing01 CHARACTER SET utf8 COLLATE utf8_bin;
ALTER DATABASE billing02 CHARACTER SET utf8 COLLATE utf8_bin;
ALTER DATABASE billing03 CHARACTER SET utf8 COLLATE utf8_bin;
ALTER DATABASE billing04 CHARACTER SET utf8 COLLATE utf8_bin;
https://www.cnblogs.com/benpao/p/11519029.html
免责声明:
① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。
② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341