title: MySql tables, error #1064 & error #1068 Multiple primary key defined
body: <p>I have got errors when I tried to install the MySql tables, error:</p>
  
  <blockquote>
    <p>"#1064 - You have an error in your SQL syntax"  </p>
  </blockquote>
  
  <p>and error:</p>
  
  <blockquote>
    <p>"#1068 - Multiple primary key defined "</p>
  </blockquote>
  
  <p>This is the database:</p>
  
  <pre><code>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`)
  
  );
  </code></pre>
  
  <p>these are the errors images:</p>
  
  <p><img src="https://i.stack.imgur.com/3Gb9V.png" alt=""></p>
  
  <p><img src="https://i.stack.imgur.com/G1FOu.png" alt=""></p>
  
  <p>How to fix it? </p>