No tienes que deshabilitar el auto_increment
rasgo. Cuando inserta una fila en la tabla y especifica el valor de la clave principal en la fila, la identificación que desea se almacena en la base de datos. El auto_increment
solo se usa cuando omite el campo de clave principal.
EDITAR:pensé que podría dar ejemplos para eso:
mysql> describe test;
+-------+------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------+------------------+------+-----+---------+----------------+
| id | int(10) unsigned | NO | PRI | NULL | auto_increment |
| value | varchar(45) | NO | | NULL | |
+-------+------------------+------+-----+---------+----------------+
2 rows in set (0.02 sec)
mysql> insert into test (value) values ('row 1');
Query OK, 1 row affected (0.06 sec)
mysql> select * from test;
+----+-------+
| id | value |
+----+-------+
| 1 | row 1 |
+----+-------+
1 row in set (0.00 sec)
mysql> insert into test values (15, 'row 2');
Query OK, 1 row affected (0.03 sec)
mysql> select * from test;
+----+-------+
| id | value |
+----+-------+
| 1 | row 1 |
| 15 | row 2 |
+----+-------+
2 rows in set (0.00 sec)
EDITAR 2
mysql> insert into test (id, value) values (3, 'row 3');
Query OK, 1 row affected (0.00 sec)
mysql> select * from test;
+----+-------+
| id | value |
+----+-------+
| 1 | row 1 |
| 15 | row 2 |
| 3 | row 3 |
+----+-------+
3 rows in set (0.00 sec)