#用于转换bit在pymysql中显示为x00的问题
from pymysql import converters
converions = converters.conversions
converions[pymysql.FIELD_TYPE.BIT] = lambda x: '0' if 'x00' else '1'
然后在connection中加上:
mysql_info = pymysql.connect(Mysql_yrs_ip_port,Mysql_yrs_username,Mysql_yrs_passwd,Mysql_yrs_db,Mysql_yrs_port,charset='utf8',conv=converions)