These code doesn't back up the entire database.Can someone tell me why please?
public void Backup()
{
string tmestr = "";
tmestr = "mudi_backup" + ".sql";
tmestr = tmestr.Replace("/", "-");
tmestr = @"C:\db\" + tmestr;
StreamWriter file = new StreamWriter(tmestr);
ProcessStartInfo proc = new ProcessStartInfo();
string DBname = "olddb > \"" + tmestr + "\"";
string cmd = string.Format("-u {0} -p {1} -h {2} {3}","root","olddb","localhost",DBname);
proc.FileName = @"C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqldump";
proc.RedirectStandardInput = true;
proc.RedirectStandardOutput = true;
proc.Arguments = cmd;
proc.UseShellExecute = false;
Process p = Process.Start(proc);
string res;
//MessageBox.Show();
res = p.StandardOutput.ReadToEnd();
MessageBox.Show("Eroaks : " + res);
file.WriteLine(res);
p.WaitForExit();
file.Close();
MessageBox.Show("Backup Completed" + cmd);
}