Click here to Skip to main content
15,896,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear All,

In my application, I've a database(e.g. MyDataBase) in MySql Server. Lets assume that MyDatabase contains 5 table and each table has updated wit some data. Now i want to create a duplicate database with name MyDataBase1, duplicate of MyDatabase, which will contain same table and data as MyDataBase. How can i do this?
Please help.
Thank you all in advance.

Regards,
Vidi
Posted
Comments
Shubh Agrahari 20-Feb-13 8:11am    
you want this by code or by wizard...?
vidiking 20-Feb-13 22:44pm    
Hi Shubh,
I want this by code. I'm using c# 2.0 with MySql Connector.
Thank you.

Hii
this link is really useful for you...just take a look...


http://stackoverflow.com/questions/268381/using-smo-to-copy-a-database-and-data[^]


Thanks Happy to Help...
 
Share this answer
 
You can always take a backup of the database and restore it in another database - MySqlBackup.NET - MySQL Backup Solution for C#, VB.NET, ASP.NET[^].
 
Share this answer
 
I'd have a read of this

MySQL Database Replication Procedure[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900