在打开数据库连接时设置: charset="utf8"
#打开数据库连接 db = pymysql.connect("localhost","root","","user_test",charset="utf8")