python mysql (1) 썸네일형 리스트형 Python DB연결 ( Mysql DB) mysql 연결해주는 library import pymysql # 간단한 insert 예시 conn = pymysql.connect(host='127.0.0.1', user='root', password='비밀번호', db='test', charset='utf8') try: with conn.cursor() as curs: sql = 'insert into test_table (test_column) values(%s)' print(sql) curs.execute(sql,(t)) conn.commit() finally: conn.close() pymysql import error 인경우 pip uninstall PyMySQL pip3 install PyMySQL stackoverflow.com/quest.. 이전 1 다음