ASP Hosting sale!
Double disk space and transfer for FREE!
Limited time offer! Act Now!

aspdev | articles | tutorials | forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Importing MySQL problem

 
Post new topic   Reply to topic    ASPdev.org Forum Index -> SQL Programming (MS SQL Server, MS Access, MySQL)
View previous topic :: View next topic  
Author Message
twinkle



Joined: 31 Jan 2006
Posts: 79

PostPosted: Thu Feb 02, 2006 4:57 pm    Post subject: Importing MySQL problem Reply with quote

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
View user's profile Send private message
administrator
Site Admin


Joined: 01 Oct 2004
Posts: 183

PostPosted: Thu Feb 02, 2006 9:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
twinkle



Joined: 31 Jan 2006
Posts: 79

PostPosted: Thu Feb 02, 2006 9:40 pm    Post subject: Reply with quote

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
View user's profile Send private message
administrator
Site Admin


Joined: 01 Oct 2004
Posts: 183

PostPosted: Thu Feb 02, 2006 9:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
mikelbeck



Joined: 31 Jan 2006
Posts: 18
Location: Lawn Guyland, Noo Yawk

PostPosted: Fri Feb 03, 2006 9:27 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
twinkle



Joined: 31 Jan 2006
Posts: 79

PostPosted: Fri Feb 03, 2006 10:37 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ASPdev.org Forum Index -> SQL Programming (MS SQL Server, MS Access, MySQL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group

SQL Tutorial