My apologies if this question has already been asked/anwered. I've just spend a bit of time looking throuh the threads, and didn't find what I was looking for, so here goes.
I need to move a lot of data from one database to another. The columns in database 1 are IDENTICAL (names, types, properties) to the columns in database 2. Every table in these databases use autoincrement columns.
To get the data over from database 1 to database 2, it seems like I need to do a mysqldump/mysqlimport. The only problem is that mysqldump actually writes out the autoincrement values during the dump. If I were to use this data when I run mysqlimport, I would get a lot of "duplicate entry" messages.
So, I guess my question is this. Is there an option for mysqldump that tells it to write out 'null' in place of any of the autoincrement values, so that I don't have to go through the text file and manually change hundreds of thousands of values to 'null' just so that I can actually import it into the second database with mysqlimport?
Thanks in advance!
I need to move a lot of data from one database to another. The columns in database 1 are IDENTICAL (names, types, properties) to the columns in database 2. Every table in these databases use autoincrement columns.
To get the data over from database 1 to database 2, it seems like I need to do a mysqldump/mysqlimport. The only problem is that mysqldump actually writes out the autoincrement values during the dump. If I were to use this data when I run mysqlimport, I would get a lot of "duplicate entry" messages.
So, I guess my question is this. Is there an option for mysqldump that tells it to write out 'null' in place of any of the autoincrement values, so that I don't have to go through the text file and manually change hundreds of thousands of values to 'null' just so that I can actually import it into the second database with mysqlimport?
Thanks in advance!