pymysql连接数据库插入中文字符串错误

    xiaoxiao2023-11-18  72

    pymysql.err.InternalError: (1366, "Incorrect string value: .....)

    数据库管理工具为heidisql

    (1)更改数据库的排序规则

    (2)更改数据库表的默认字符集,更改具体字段的排序

    (3)更改charset="utf8mb4" db = pymysql.connect(host='127.0.0.1', user='root', passwd='***', db='***', charset="utf8mb4", use_unicode=True)

     

    最新回复(0)