发布于 4年前

Warning: (3719, "'utf8' is currently an alias for the character set UTF8MB3, which will be replac...

报Waning但数据成功插入

问题分析:

初步判定是传进去的的数据编码类型是UTF8MB4,而MySQL里的是UTF8MB3,它建议改编码,参考

https://mathiasbynens.be/notes/mysql-utf8mb4

这个分析只是个人猜测,谨供参考。


版本8.0.11 my.ini

[client]

default-character-set =utf8mb4

[mysql]

# 设置mysql客户端默认字符集

default-character-set=utf8mb4

[mysqld]

;设置3306端口

port =3306

#设置mysql的安装目录

basedir=E:\\mysql\\mysql-8.0.11-winx64

#设置mysql数据库的数据的存放目录

datadir=E:\\mysql\\mysql-8.0.11-winx64\\data

# 允许最大连接数

max_connections=200

#服务端使用的字符集默认为8比特编码的latin1字符集

character-set-server=utf8mb4

#创建新表时将使用的默认存储引擎

default-storage-engine=INNODB

collation-server =utf8mb4_unicode_ci

character-set-client-handshake =FALSE

init_connect='SET NAMES utf8mb4'

问题:

**Warning: (1366, “Incorrect string value: ‘\xD6\xD0\xB9\xFA\xB1\xEA…’ for column ‘VARIABLE_VALUE’ at row 518”)

result = self._query(query)**

**Warning: (3719, “‘utf8’ is currently an alias for the character set UTF8MB3, which will be replaced by UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.”)**

©2020 edoou.com   京ICP备16001874号-3