pymysql查询数据中文显示乱码

Python调用MySQLdb插入中文乱码的问题

conn = MySQLdb.connect(host='localhost', user='root',passwd='123', db='account', charset='utf8'),需要设定charset,同时需要注意创建数据库时的字符集编码是否一致

https://www.cnblogs.com/my8100/p/7470572.html

猜你喜欢

转载自blog.csdn.net/luocheng7430/article/details/82107930