Terminating idle mysql connections

Manual cleanup: You can KILL the processid. mysql> show full processlist; +———+————+——————-+——+———+——-+——-+———————–+ | Id | User | Host | db | Command | Time | State | Info | +———+————+——————-+——+———+——-+——-+———————–+ | 1193777 | TestUser12 | 192.168.1.11:3775 | www | Sleep | 25946 | | NULL | +———+————+——————-+——+———+——-+——-+———————–+ mysql> kill 1193777; But: the php application might … Read more

How do I kill a process using Vb.NET or C#?

You’ll want to use the System.Diagnostics.Process.Kill method. You can obtain the process you want using System.Diagnostics.Proccess.GetProcessesByName. Examples have already been posted here, but I found that the non-.exe version worked better, so something like: foreach ( Process p in System.Diagnostics.Process.GetProcessesByName(“winword”) ) { try { p.Kill(); p.WaitForExit(); // possibly with a timeout } catch ( Win32Exception … Read more