import pymysql
conn = pymysql.connect(host='127.0.0.1', port=3306, user='root',
passwd='123456',db='home', charset="utf-8")
cursor = conn.cursor()
cursor.execute("""create table job_list(job varchar(30) , people varchar(30) , catagory varchar(30) , place varchar(30), publish varchar(30)) """)
try:
cursor.execute("""INSERT INTO job_list(job,people,catagory,place,publish) VALUES (%s, %s, %s, %s, %s)""",
["算法工程师", "2018毕业生", "研发", "雅加达", "2018-03-28"])
conn.commit()
except pymysql.Error as e:
print(e)
cursor.close()
conn.close()
having set charset but it is not useful,how can i insert Chinese into mysql