请问你MYSQL版本,也许是版本问题
请看以下说明:
The following list tells what you have to watch out for when upgrading to Version 3.23:AUTO_INCREMENT will not work with negative numbers. The reason for this is that negative numbers caused problems when wrapping from -1 to 0. AUTO_INCREMENT for MyISAM tables is now handled at a lower level and is much faster than before. For MyISAM tables old numbers are also not reused anymore, even if you delete some rows from the table.

解决方案 »

  1.   

    这样试试:
    把你的id列删除
    alter table tablename drop id
    然后在重新加入id列
    alter table tablename add id int(11) unsigned not null auto_increment primary key
    这样默认加的id在最后,如果你想加在最前面这样:
    alter table tablename add id int(11) unsigned not null auto_increment primary key first
    如果你想把该列加在某列的后面这样做:
    alter table tablename add id int(11) unsigned not null auto_increment primary key after columnps:  auto_increment and unsigned 两个属性值用于整数列。
      

  2.   

    DELETE FROM table1;
    ALTER TABLE table1 AUTO_INCREMENT=1;
      

  3.   

    应该是你在此前这个表做过很多插入删除操作。到达了ID的最大值。
    所以,再没有办法加一了。
    最好的办法可能也只有COPY一个一样的表,然后改名。