mysql 8中utf8和utf8mb4运行时的编码告警提醒

2020-01-14T21:14:26.516484Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
2020-01-14T21:14:26.516496Z 0 [Warning] [MY-013244] [Server] --collation-server: 'utf8_general_ci' is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate collation instead.

'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release

解决方案

修改my.cnf文件

把mysql字符集和排序规则改一下

# 指定编码 utf8mb4
character-set-server=utf8mb4

# utf8mb4的排序规则
collation-server=utf8mb4_0900_ai_ci
 
发布了178 篇原创文章 · 获赞 83 · 访问量 85万+

猜你喜欢

转载自blog.csdn.net/fuck487/article/details/104303508