windowswinformswin32exception

MySQL backup process hit with a Win32Exception that the system cannot find the file specified


I am hit with a mysterious win32exception here when i was attempting to do a mysqldump(backup) to backup my database on a windows form , .Net Framework 4.0, Visual Studio 2010 on a x64 Windows 8.0 machine.

All went fine except for this process where it crashes mysteriously where they said that the system cannot find the file specified.

Any direction on how I can solve this? Thanks!

The place where I was hit with an error


Solution

  • You are using UseShellExecute=false. In this context, the MSDN specifies that the FileName property should be a fully qualified path to the executable. So, just writing mysqldump.exe as the filename is not enough to start the process.

    I recommend to set also the WorkingDirectory to the path where the mysql binaries are installed because, if the process launched needs some local installed resources, withoud a WorkingDirectory set you could have hard times to understand errors about files not found or missing configuration files.