【MYSQL】MYSQL报错解决方法: Warning: (3719, "'utf8' is currently an alias for the character set UTF8MB3, but...

  

  用python3.6.5创建mysql库时出现如下报错,虽然报错,但是数据库可以插入成功。

D:\python3\lib\site-packages\pymysql\cursors.py:170: Warning: (3719, "'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.")
  result = self._query(query)

  

 解决方法

  •   python版本:3.6.5
  •   mysql版本: 8.0.12

  

  1. 首先查看下mysql字符集

mysql> SHOW VARIABLES WHERE Variable_name LIKE 'character\_set\_%' OR Variable_name LIKE 'collation%';
+--------------------------+--------------------+
| Variable_name            | Value        

你可能感兴趣的:(数据库,python,开发工具)