• 흐림동두천 1.0℃
  • 흐림강릉 1.3℃
  • 서울 3.2℃
  • 대전 3.3℃
  • 대구 6.8℃
  • 울산 6.6℃
  • 광주 8.3℃
  • 부산 7.7℃
  • 흐림고창 6.7℃
  • 흐림제주 10.7℃
  • 흐림강화 2.2℃
  • 흐림보은 3.2℃
  • 흐림금산 4.4℃
  • 흐림강진군 8.7℃
  • 흐림경주시 6.7℃
  • 흐림거제 8.0℃
기상청 제공

mysqldump: Couldn't execute 'SET OPTION SQL_QUOTE_SHOW_CREATE=1': You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION SQL_QUOTE_SHOW_CREATE=1' at line 1 (1064)

mysqldump: Couldn't execute 'SET OPTION SQL_QUOTE_SHOW_CREATE=1': You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION SQL_QUOTE_SHOW_CREATE=1' at line 1 (1064)

디비 덤프 시 아래와 같은 오류가 있는경우 체크 할 사항

 

# 덤프 시 에러내용

root@web:/var/lib/mysql5# mysqldump -u root -p database > database.sql
Enter password: 
mysqldump: Couldn't execute 'SET OPTION SQL_QUOTE_SHOW_CREATE=1': You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION SQL_QUOTE_SHOW_CREATE=1' at line 1 (1064)

 

# 체크 할 사항

설치된 데이터베이스 서버와 클라이언트툴의 버전이 맞는지 체크한다. 서버의 경우 소스 컴파일하여 5.6.x를 설치하였지만 클라이언트툴은 rpm 으로 기본 설치된 5.0.x의 클라이언트툴이 PATH에 먼저 잡히면서 덤프 시 위와같은 오류가 있는 경우가 많다. 실제 설치한 경로에 있는 mysqldump 명령어를 활용하면 해결될 수 있따.