Backup MySQL using ASP.Net C#

Hi guys, I followed the code written on this certain site - Mysql backup using c#, the function create successfully a backup file but unfortunately it does not create any query of database or tables. Can anyone help me regarding this matter. Thank you so much.

The code is using mysqldump so the parameters relating to that utility apply. The parameters are put together on the line

string cmd = string.Format(@“-u{0} -p{1} -h{2} {3}”, “root”, “root”, “localhost”, DBName);

Your want to include a -R which means “Included stored routines (procedures and functions) for the dumped databases in the output”

so the statement becomes

string cmd = string.Format(@“-u{0} -p{1} -h{2} -R {3}”, “root”, “root”, “localhost”, DBName);

another thing, why is it that this thread that I started can also be seen in this link Backup MySQL using ASP.Net C# | Flip Forum

because apparently that site is scraping the web

i’ll flag this thread and ask sitepoint headquarters to look into it – they have lawyers for this type of theft

MySQL :: Re: Any One know that how to take Backup From ASP.NET with C# for MySQL for a WebApplication ?

Basically you need to call mysqldump.exe to make sql script for your database

Process.Start(“Path \mysqldump.exe”, “–user=user --password= password --host=server --databases Database Name -r ““path\filename.sql”””)

DB Backup