• 흐림동두천 3.8℃
  • 흐림강릉 9.7℃
  • 흐림서울 5.4℃
  • 흐림대전 6.1℃
  • 흐림대구 8.7℃
  • 흐림울산 8.9℃
  • 흐림광주 7.4℃
  • 흐림부산 10.2℃
  • 흐림고창 4.2℃
  • 흐림제주 11.6℃
  • 흐림강화 4.9℃
  • 흐림보은 3.7℃
  • 흐림금산 4.8℃
  • 흐림강진군 7.0℃
  • 흐림경주시 7.0℃
  • 흐림거제 10.3℃
기상청 제공

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