Import data - Problem with autoincrement field
Posted on 2004-09-19
Let's say i have TABLE-1 in mysql-server1 with 2 columns :
id PRIMARY auto-increment.
In TABLE-1 i have 2 rows
If i make an export of TABLE-1 in mysql-server2 with mysqldump, i get a file that contain
INSERT INTO TABLE-1 VALUES (1,'ROBERT');
INSERT INTO TABLE-1 VALUES (2,'JASON');
How could I do to import data from mysql-server2 without having problem with "DUPLICATE KEY" of id.
Can i get this export with mysqldump, typing a specific option ?? : (that would solve my problem)
INSERT INTO TABLE-1 VALUES ('','ROBERT');
INSERT INTO TABLE-1 VALUES ('','JASON');
Or do i need to do something while importing.
My real world table have many columns and about 600Mb of data, so i need an adapted solution.