尝试安装 MySql 表时出现错误,错误:
“#1064 - 您的 SQL 语法有错误”
和错误:
“#1068 - 定义了多个主键”
这是数据库:
CREATE TABLE messages (
msg_id INT PRIMARY KEY AUTO_INCREMENT,
message VARCHAR(200),
uid_fk INT(10),
ip VARCHAR(45),
created INT(10),
uploads VARCHAR(50),
profile_uid INT(10)
PRIMARY KEY (`msg_id`),
KEY `uid_fk` (`uid_fk`)
);
CREATE TABLE comments (
com_id INT PRIMARY KEY AUTO_INCREMENT,
comment VARCHAR(200),
msg_id_fk INT(10),
uid_fk INT(10),
ip VARCHAR(45),
created INT(10),
PRIMARY KEY (`com_id`),
KEY `msg_id_fk` (`msg_id_fk`),
KEY `uid_fk` (`uid_fk`)
);
CREATE TABLE likes (
like_id INT PRIMARY KEY AUTO_INCREMENT,
msg_id_fk INT(10),
uid_fk INT(10),
PRIMARY KEY (`like_id`),
KEY `msg_id_fk` (`msg_id_fk`),
KEY `uid_fk` (`uid_fk`)
);
CREATE TABLE user_uploads (
id INT PRIMARY KEY AUTO_INCREMENT,
image_path VARCHAR(500),
uid_fk INT(10),
PRIMARY KEY (`id`),
KEY `uid_fk` (`uid_fk`)
);
CREATE TABLE follow_user (
fid INT PRIMARY KEY AUTO_INCREMENT,
uid_fk INT(10),
following_uid INT(10),
PRIMARY KEY (`fid`),
KEY `uid_fk` (`uid_fk`)
);
这些是错误图像:
如何解决?