Forward Engineering in MySQL Workbench outputs error 1064

Hi, I’m newbie for mysql. I’ve been trying to Forward Engineer my model using MySQL Workbench but I always get an error 1064. I asked this question on stack overflow yesterday but I didn’t get any response… Maybe more people here can help me :slight_smile:

Here is output
image

I have no experience with mySQL what so ever, so I’m sorry if this is a very simple problem. Thanks for your help :slight_smile:

Here is input
image

image

image

image

Hello, I had the same issue and it seems to be solved by a simple solution:

Somehow an extra table with the name “table1” was created.

  • So, don’t execute your code, copy-paste it to a new query, then Ctrl+F and search for table1.

  • Then delete the following lines related to it :


– Table school.table1


– CREATE TABLE IF NOT EXISTS school.table1 (
– )
– ENGINE = InnoDB;

(You can also delete those lines before executing your code from the “Forward Engineer To Database” window, but then you must find the table1 lines by searching your code manually)

  • Then execute your code and the problem is solved.