You have to turn off identity insert, insert the records then turn on identity insert back.
Example:
ALTER TABLE ps_product DROP PRIMARY KEY, MODIFY id_product INT PRIMARY KEY NOT NULL; --insert commmand here.... ALTER TABLE ps_product DROP PRIMARY KEY, MODIFY id_product INT AUTO_INCREMENT PRIMARY KEY NOT NULL;