When I try to backup mysql database I am not getting ExportToFile
instead its showing export in the line shown as comment statement. How could I achieve that?
Here is my code:
private void Backup()
{
string constring = "server=localhost;user=root;pwd=;database=testdb;Allow Zero Datetime=true";
string file = "D:\\sss.sql";
MySqlConnection conn = new MySqlConnection(constring);
MySqlCommand cmd = new MySqlCommand();
MySqlBackup mb = new MySqlBackup(cmd);
cmd.Connection = conn;
conn.Open();
mb.Export(file); //mb.ExportToFile//
conn.Close();
}