I have a little more than hundred php scripts running on my server right now. Each one of them run loops and insert data into my db. I did that in order to learn killing processes in mysql. So to kill them, I coded a php file that loops through the processlist and kill them one by one. The problem is that this script is not executed. It keeps loading in my browser (no errors...). Also do note that I can't manually launch a show processlist in mysql, as mysql is totally overloaded at the moment, and nothing is responding. So what I guess is that my 'killing process' script is the last one on the queue and will only be executed at the end. So my question is to know if there is a way to force a process in mysql and put it at priority number one. Thank you in advance for your replies. Cheers. Marc
This is how I am killing the processes:
$qry = mysql_query("SHOW FULL PROCESSLIST");
while ($row=mysql_fetch_array($qry)) {
$process_id=$row["Id"];
$sql="KILL $process_id";
mysql_query($sql);
}