I created a Winforms in order to backup my Database. Then When I run my program it gives an Win32Exception was unhandled. \"The system cannot find the file specified\" Altho
ProcessStartInfo psi = new ProcessStartInfo();
psi.FileName = @"C:\\xampp\mysql\bin\mysql.exe";
psi.RedirectStandardInput = true;
psi.RedirectStandardOutput = false;
psi.CreateNoWindow = true;
psi.Arguments = string.Format(@"-u{0} -p{1} -h{2} {3}<{4}", "root", "password", "localhost", "your_dbname", "your_.sql_file");
psi.UseShellExecute = false;
Process process = Process.Start(psi);
process.StandardInput.WriteLine(input);
process.StandardInput.Close();
process.WaitForExit();
process.Close();
This one worked for me you can try it out as long as you've your backed up .sql file