Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Below query I'm executing in Ubuntu 12, MySQL 5.1 version and receiving error as mentioned:

CREATE TABLE mantis_config_table (
    config_id VARCHAR(64) NOT NULL,
    project_id INTEGER NOT NULL DEFAULT 0,
    user_id INTEGER NOT NULL DEFAULT 0,
    access_reqd INTEGER DEFAULT 0,
    type INTEGER DEFAULT 90,
    value LONGTEXT NOT NULL,
    PRIMARY KEY (config_id, project_id, user_id)
) TYPE=MyISAM;

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=MyISAM' at line 9

Can anyone suggest what's wrong?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
810 views
Welcome To Ask or Share your Answers For Others

1 Answer

Replace

TYPE=MyISAM

with

ENGINE=MyISAM

The problem was "TYPE=MyISAM" which should be "ENGINE=MyISAM" as per MySQL version updates - a simple search / replace has fix it.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...