바뀜

947 바이트 추가됨 ,  2021년 4월 5일 (월) 21:56
3번째 줄: 3번째 줄:     
mysql 뿐 아니라 mariaDB에서도 사용 가능하다.
 
mysql 뿐 아니라 mariaDB에서도 사용 가능하다.
 +
 +
pip install pymysql
    
=기본사용법=
 
=기본사용법=
76번째 줄: 78번째 줄:  
객체=커서객체.fetchall()
 
객체=커서객체.fetchall()
 
|}
 
|}
 +
 +
= 에러 =
 +
 +
=== pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on 'localhost' ([WinError 10061] No connection could be made because the target machine actively refused it)") ===
 +
굉장히 많은 이유로 발생하는 에러이다.
 +
{| class="wikitable"
 +
!의도
 +
!설명
 +
!방법
 +
|-
 +
|뭔가 잘못 쓴 경우
 +
|user든, 비밀번호든, 포트번호든 뭔가 잘못쓴 경우.
 +
|한 번 더 점검해보는 수밖에...
 +
|-
 +
|버전이 안맞을 경우
 +
|새로운 버전 혹은 파이썬 버전과 맞는 버전을 설치한다.
 +
|pip install --upgrade pip
 +
pip install pymysql
 +
|-
 +
|
 +
|
 +
|
 +
|}
 +
 +
=== pymysql.err.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '장소'") ===
 +
사용하는 구문이 맞지 않을 때 발생하는 에러. execute 안의 SQL_query가 틀렸을 때 나오는 에러이다.
익명 사용자