• 흐림동두천 -14.9℃
  • 맑음강릉 -8.3℃
  • 맑음서울 -10.9℃
  • 맑음대전 -10.2℃
  • 맑음대구 -6.5℃
  • 맑음울산 -6.2℃
  • 흐림광주 -7.0℃
  • 맑음부산 -5.8℃
  • 흐림고창 -10.3℃
  • 제주 2.1℃
  • 맑음강화 -14.4℃
  • 흐림보은 -13.5℃
  • 맑음금산 -11.2℃
  • 맑음강진군 -6.8℃
  • 맑음경주시 -7.1℃
  • 맑음거제 -4.1℃
기상청 제공

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 명령어를 활용하면 해결될 수 있따.