简体   繁体   中英

How to Backup Automatically Mysql in C# coding?

I want to backup my Database in MySQL for Each time Application is Closing.

I googled for the DUMP in MySQL. but i got only php or batch file programs.

Any one know how to Backup Automatically Mysql in C# coding?.

Or Executing Batch is the Only way. Is it possible in Winform C#?.

My Connection String is -

connectionString="server=192.168.1.100;User Id=root;database=mcs_sps;Persist Security Info=True"

Thanks in Advance!.

使用过程类,你可以启动一个实例用mysqldumpmysqlhotcopy的倾倒整个MySQL数据库,命令行程序。

There are good samples and a good best practice in the following link: http://forums.mysql.com/read.php?47,214274,214274#msg-214274

I think your best shot is that aL3891 suggests unless you do not want to pay . If you want to pay for this simple task check out these links:

  1. http://www.devart.com/dotconnect/mysql/docs/Devart.Data.MySql~Devart.Data.MySql.MySqlDump.html

  2. http://www.devart.com/

The best solution is this http://www.codeproject.com/Articles/256466/MySqlBackup-NET-MySQL-Backup-Solution-for-Csharp-V

I tried it in my application and it works perfectly

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM