mysql默认字段值区分大小写: character-set-server=utf8 collation-server=utf8_bin init-connect="SET NAMES utf8;" SELECT DEFAULT_
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
--结束END--
本文标题: [mysql]修改collation为utf8_bin
本文链接: https://lsjlt.com/news/1754.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-10-23
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0