python mysql pymsql 存 表情字符(解决)

一、客户端创建连接
        conn = pymysql.connect(host, user, passwd, db, charset='utf8mb4')

二、创建数据库也要配置

        charset='utf8mb4'
        参考http://www.cnblogs.com/oneby/p/9303234.html

猜你喜欢

转载自blog.csdn.net/Felix__H/article/details/83182328