Our mysql instance occaisionally locks up during backups. Currently we must VPN into the corporate network (to obtain work I.P.), remote desktop into the server, open the task manager, and manually kill the mysqld-nt.exe process.
Instead of doing all of this we are attempting to create a simple webpage that we can log into to kill and restart the service.
The following block of code is wired up inside our new .aspx page works as I intended on my local desktop (running in VS debug mode), but doesn't do anything when pushed to the server (no errors or anything):
Process myProcess = new Process();
ProcessStartInfo myProcessStartInfo = new ProcessStartInfo("taskkill");
myProcessStartInfo.Arguments = "/IM mysqld-nt.exe /F";
myProcessStartInfo.UseShellExecute = false;
myProcessStartInfo.RedirectStandardOutput = true;
myProcessStartInfo.CreateNoWindow = true;
myProcess.StartInfo = myProcessStartInfo;
myProcess.Start();
myProcess.Close();
If I run "taskkill /IM mysqld-nt.exe /F" from the command prompt on the server it kills the service. So I think it might be a permissions issue, but I'm not positive.
Can anyone spot something wrong with the code block above, or tell me how to adjust the permissions so .Net can stop/start this process?
Thanks for the help, Sam