#coding=utf-8 import MySQLdb db = MySQLdb.connect("IP","用户名","密码","库名",charset = 'utf8')
连接参数里加上 charset='utf8'