MySQL Workbench | ERROR: Error 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 ') ENGINE = InnoDB' at line 11

2023. 3. 8. 16:04·기타
반응형

MySQL Workbench를 이용해서 원격 서버에 있는 MariaDB에 디비 구축을 해보았다.

 

다이어그램으로 작성하면 한눈에 테이블간 관계 등을 눈으로 쉽게 확인할 수 있어서 

EER Diagram으로 모델 작성 후 Forward Engineer를 통해 데이터베이스에 테이블 생성을 하려고 했는데 제목과 같은 오류가 났다.

ERROR: Error 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 ') ENGINE = InnoDB' at line 11

 

에러메세지 검색을 통해 이 에러가 내 db 버전과 워크벤치 설정의 타겟 db버전이 맞지 않아서 생기는 에러라는 것을 알게 되었다. (기본 타겟 db버전은 8.0.32로 설정되어 있었다.)

 

해결

📍 내 MariaDB 버전 확인

접속 시 나오는 웰컴 메세지나

mysql -V

mysql -V 명령어를 통해 확인 가능하다.

 

📍 호환되는 MySQL 버전 확인

MySQL MariaDB version mapping 검색어로 아래 참고사이트를 찾았고

MariaDB 10.3은 MySQL 5.7과 호환된다는 것을 확인했다.

 

📍 MySQL Workbench 설정 변경

노란네모부분을 클릭하면 preferences 변경을 할 수 있다.

 

Modeling -> MySQL에서

Default Target MySQL Version을 5.7로 변경하고 저장해준다.

 

결과

다시 Forward Engineer를 실행하면 정상적으로 동작이 완료되고 데이터베이스에 테이블이 생성된다.

 

 

 

참고

https://mariadb.com/kb/en/mariadb-vs-mysql-compatibility/#mysql-57

반응형
저작자표시 비영리 변경금지 (새창열림)

'기타' 카테고리의 다른 글

[AWS] Elastic Beanstalk 에러: The instance profile aws-elasticbeanstalk-ec2-role associated with the environment does not exist.  (0) 2024.10.22
[AWS] Elastic Beanstalk 에러: The following resource(s) failed to create: [AWSEBAutoScalingLaunchConfiguration].  (1) 2024.10.22
MantisBT | 첨부파일 최대크기 늘리기  (0) 2023.02.17
리눅스 scp 명령어로 아마존 리모트 서버에 파일 복사하기  (0) 2023.02.16
MantisBT | 프로젝트 생성 권한 변경하기  (0) 2023.01.11
'기타' 카테고리의 다른 글
  • [AWS] Elastic Beanstalk 에러: The instance profile aws-elasticbeanstalk-ec2-role associated with the environment does not exist.
  • [AWS] Elastic Beanstalk 에러: The following resource(s) failed to create: [AWSEBAutoScalingLaunchConfiguration].
  • MantisBT | 첨부파일 최대크기 늘리기
  • 리눅스 scp 명령어로 아마존 리모트 서버에 파일 복사하기
이라후
이라후
  • 이라후
    화이팅
    이라후
  • 전체
    오늘
    어제
    • 분류 전체보기 (133)
      • TIL (23)
      • 기타 (26)
      • Python (14)
      • Django (10)
      • JavaScript (8)
      • git & GitHub (8)
      • Web (10)
      • Go (3)
      • wecode (31)
  • 반응형
  • 인기 글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
이라후
MySQL Workbench | ERROR: Error 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 ') ENGINE = InnoDB' at line 11
상단으로

티스토리툴바