用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 usin
当向 MySQL 数据库插入一条带有中文的数据形如 insert into employee values(null,'张三','female','1995-10-08','2015-11-12','Sales',2000,'是个好员工!'); 出现乱码时,可以使用语句 show variables like 'character%'; 来查看当前数据库的相关编码集. 从上图中可以看到 MySQL 有六处使用了字符集,分别为:client .connection.database.results
mysql中文乱码解决方法:将mysql数据库编码统一utf8 查看数据库编码: show variables like 'character%'; 编辑/etc/my.cnf [mysql] default-character-set=utf8 [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql # Disabling symbolic-links is recommended to preve