(python) send data to mysql using pymysql module


(python) send data to mysql using pymysql module

before connection data setting, check host, port, user, password, db especially, you need to confirm data table of mysql server -> data format import pymysql.cursors import threading import time def insert_data(): print('send sample data') # connection 정보 conn = pymysql.connect( host = 'xxxx.xxxx.xxxxx', # host name port= 3307, user = 'xxxxx', # user name password = 'xxxxxxx', # password db = 'xxxx', # db name charset = 'utf8' ) curs = conn.cursor() sql = "insert into xxxx.xxxxxx (UpdateTime,dat...



원문링크 : (python) send data to mysql using pymysql module