mysql 설치 블로그
m.blog.naver.com/bjh7007/221829548634
🎈Oracle, my SQL비교
my sql을 실행하고 가장 먼저 자동commit이 활성화 되어있는지 확인합니다.
자동 커밋을 활성화하면 commit
을 입력하지 않아도 자동으로 커밋이 됩니다. (roll back사용이 안됨) 그럼 중요한 데이터가 손상될 수 있으니 자동커밋을 해제 합니다.
conda install pymysql
입력
import pandas as pd
import pymysql
conn = pymysql.connect(host ='localhost',user ='root', password = 'tiger',db ='orcl',charset = 'utf8') #본인의 user name, password를 입력해준다.
cursors = conn.cursor()
sql = "select * from emp"
cursors.execute(sql)
row = cursors.fetchall()
colname = cursors.description
col = []
for i in colname:
col.append(i[0].lower())
emp = pd.DataFrame(row, columns = col)
이제 주피터, my_SQL모두 사용할 수있다.
단 my_SQL에서 수정을 하였으면 주피터에서 clear을 한번 하고 재시작한다.