user3657631
user3657631

Reputation: 45

MySQL syntax error when specifying innodb database type and character set

I cant seem to import my tables.sql to a database called callumba_login. Here is the SQL:

CREATE TABLE Country(
    country_code                char(2) not null,
    country_name                varchar(60) not null,
    primary key(country_code)
    )type=innodb DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

MySQL says:

#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 type=innodb DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci at line 5

Upvotes: 3

Views: 4767

Answers (1)

Barmar
Barmar

Reputation: 781716

The error message points you directly to the bad syntax.

type=innodb should be engine=innodb.

Upvotes: 6

Related Questions