Naim Khan Posted September 16, 2009 Share Posted September 16, 2009 hello sir, will you plz tell me how can i take backup of mysql using windows Form in C#. if i click the button of Back Up then back up should be completed. thanks in Advance Naim Khan Link to comment Share on other sites More sharing options...
0 sathenzar Posted September 16, 2009 Share Posted September 16, 2009 Have you ever checked out the C# Connector program on the mysql web site? That's what I use for all my MySQL C# applications. You can download it here: http://dev.mysql.com/downloads/connector/net/6.1.html. They also provide a ton of documentation. Link to comment Share on other sites More sharing options...
0 sbauer Posted September 16, 2009 Share Posted September 16, 2009 Have you program call the executables (mysqldump) they've already created. http://dev.mysql.com/doc/refman/5.1/en/backup.html Link to comment Share on other sites More sharing options...
0 Antaris Veteran Posted September 16, 2009 Veteran Share Posted September 16, 2009 Have you program call the executables (mysqldump) they've already created. http://dev.mysql.com/doc/refman/5.1/en/backup.html +1 You can use the Process type to call an executable: using System.Diagnostics; public void Backup() { string path = "mysqldump ..."; Process.Start(path); } where path is the path to the mysqldump executable with parameters... Link to comment Share on other sites More sharing options...
0 supercteboyz Posted October 10, 2009 Share Posted October 10, 2009 You can use the mysqldump reference to learn about the attribut using mysqldump at http://dev.mysql.com/doc/refman/5.1/en/backup.html and you can call it using Process method to call the mysqldump using System.Diagnostics; . . . public void Backup() { Process backup = new Process(); backup.StartInfo.FileName = @"[your mysql installation path]\mysqldump.exe"; backup.StartInfo.Arguments = "[db_name] > [backup-file.sql]"; backup.Start(); //if you wanted to wait until the backup process finished backup.WaitForExit(); } Link to comment Share on other sites More sharing options...
Question
Naim Khan
hello sir,
will you plz tell me how can i take backup of mysql using windows Form in C#. if i click the button of Back Up then back up should be completed.
thanks in Advance
Naim Khan
Link to comment
Share on other sites
4 answers to this question
Recommended Posts