title: MySQL alter table add column with primary key syntax error
body: <p>I'm trying to add a column to one of of my database tables, but there is a syntax error
  and I can't seem to find the problem...</p>
  
  <p>My current database table looks like this:
  </p>
  
  <pre><code>component   +  tag_id  +  item_id
  ------------|----------|-----------
  com_content |    23    |    2642
  com_content |    26    |    3481
  com_content |    35    |    1868
  com_content |    85    |    5827
  com_content |    89    |    7882
  </code></pre>
  
  <p>I want it to look like this, where 'id' is auto increment and all columns part of the primary key
  </p>
  
  <pre><code> id  +  component   +  tag_id  +  item_id
  -----|--------------|----------|-----------
    1  |  com_content |    23    |    2642
    2  |  com_content |    26    |    3481
    3  |  com_content |    35    |    1868
    4  |  com_content |    85    |    5827
    5  |  com_content |    89    |    7882
  </code></pre>
  
  <p>This is my query:
  </p>
  
  <pre><code>DROP PRIMARY KEY
  ALTER TABLE gitags_items
  ADD COLUMN id INT NOT NULL AUTO_INCREMENT FIRST
  PRIMARY KEY (id,component,tag_id,item_id)
  </code></pre>
  
  <p>However I'm getting this error message:
  </p>
  
  <pre><code>#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 'PRIMARY KEY ALTER TABLE gitags_items ADD COLUMN id INT NOT NULL AUTO_INC' at line 1
  </code></pre>
  
  <p>Any help/pointers would be much appreciated</p>