Click here to Skip to main content
12,295,252 members (57,326 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# MySQL
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 20-Feb-13 2:03am
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.
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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...
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

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[^].
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

I'd have a read of this

MySQL Database Replication Procedure[^]
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160525.2 | Last Updated 20 Feb 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100