Here is the error:
Executing SQL script in server
ERROR: Error 1064: 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 ')
REFERENCES `mydb`.`Skill` ()
ON DELETE NO ACTION
ON UPDATE NO ACTI' at line 5
CREATE TABLE IF NOT EXISTS `mydb`.`employeeSkill` (
`idEmployee` INT NOT NULL ,
PRIMARY KEY (`idEmployee`) ,
CONSTRAINT `idSkill`
FOREIGN KEY ()
REFERENCES `mydb`.`Skill` ()
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
SQL script execution finished: statements: 18 succeeded, 1 failed
You’ve mixed up the syntax for defining column constraints with defining table constraints. Inside the parens after the table name, you should have a comma-separated list of column definitions, which are of the form “column_name column_type column_constraints” where the only required element is the column name. After the first comma, though, you have
PRIMARY KEY (idEmployee), which is not a column definition. (Instead, it’s syntax appropriate for anALTER TABLEcommand.) Check the syntax of theCREATE TABLEcommand here.