View previous topic :: View next topic |
Author |
Message |
twinkle
Joined: 31 Jan 2006 Posts: 79
|
Posted: Thu Feb 02, 2006 4:57 pm Post subject: Importing MySQL problem |
|
|
I am trying to export a mySQL db from one server and import it to another.
When I try to do it though, I get an error that the field or data already exists. What I want to do is overwrite the fields that already exist with the imported data. What am I doing wrong? _________________ I shine |
|
Back to top |
|
|
administrator Site Admin
Joined: 01 Oct 2004 Posts: 183
|
Posted: Thu Feb 02, 2006 9:30 pm Post subject: |
|
|
Can you post the exact error you got? How did you do the export and import?
Thanks,
Peter _________________ Peter
ASP & ASP.NET Articles and Tutorials |
|
Back to top |
|
|
twinkle
Joined: 31 Jan 2006 Posts: 79
|
Posted: Thu Feb 02, 2006 9:40 pm Post subject: |
|
|
I am getting "Table Marksman_Data Already Exists"
I am just using the export option and then pasting the file in phpmyadmin on the other server and then it processes it and gives me that error. _________________ I shine |
|
Back to top |
|
|
administrator Site Admin
Joined: 01 Oct 2004 Posts: 183
|
Posted: Thu Feb 02, 2006 9:43 pm Post subject: |
|
|
You can import the data to a new table, lets say Marksman_Data_Temp and then update (overwrite) the original table with the values from the temp one...
Peter _________________ Peter
ASP & ASP.NET Articles and Tutorials |
|
Back to top |
|
|
mikelbeck
Joined: 31 Jan 2006 Posts: 18 Location: Lawn Guyland, Noo Yawk
|
Posted: Fri Feb 03, 2006 9:27 am Post subject: |
|
|
Are the structures the same in both databases? If so, when you export from the first database, don't include the "create table" commands. That way it'll just insert the data but won't try to create tables that already exist. |
|
Back to top |
|
|
twinkle
Joined: 31 Jan 2006 Posts: 79
|
Posted: Fri Feb 03, 2006 10:37 am Post subject: |
|
|
mikelbeck wrote: | Are the structures the same in both databases? If so, when you export from the first database, don't include the "create table" commands. That way it'll just insert the data but won't try to create tables that already exist. |
Can I do that with the export command? I guess I will have to go back and check phpmyadmin. I don't use it that often so I am not sure of all its functionality.
If so, then that will hopefully work for me. Although if not I will do the back table that Peter suggested. My only thing is I am not sure how I update one table for another.
Sorry for this basic level of sql incompetance. _________________ I shine |
|
Back to top |
|
|
|