MYSQL KILL processes from SHOW PROCESS LIST using php script

Closed Posted 4 years ago Paid on delivery
Closed Paid on delivery

hi i was trying to make a php script to run from a domain to clear out all processes which have high time.

to see the processes in mysql phpmyadmin i use SHOW PROCESS LIST and KILL them from there.

however i want to do this using a php script in the browser if possible.

i tried $result = mysql_query("SHOW FULL PROCESSLIST");

while ($row=mysql_fetch_array($result)){

$process_id=$row["Id"];

if ($row["Time"] > 10 ) {

$sql="KILL $process_id";

mysql_query($sql);

}

}

but this seems to not work or incomplete

i need help urgently to make this into a proper php script to do the job

it doesnt have any db informnation there or doesnt call [login to view URL] is this the problem?

HTML MySQL OSCommerce PHP Software Architecture

Project ID: #24306201

About the project

13 proposals Remote project Active 4 years ago

13 freelancers are bidding on average $27 for this job

shihan033010

Hi I can complete the functionality. Please accept the bid and create the milestone. I am ready to start the project. Thanks Shihan

$15 USD in 1 day
(330 Reviews)
6.8
articontech

Hello, How are you? Hope you are doing well. I have read all the requirements and ready for discuss. Just message me when you are free. thanks

$30 USD in 1 day
(109 Reviews)
6.0
goodwork20k

I am good in php mysql along with automation and development, please let me know if you are good to award this project to me

$55 USD in 2 days
(38 Reviews)
5.5
bestsolz1

Hello Sir! I have checked your issue, we can help in fixing your this issue. Please discuss through message. Thanks.

$25 USD in 1 day
(38 Reviews)
4.7
hntcoder

Hi there. I have read your job description and got very interested in working on this project. I can fix this within an hour. I am able to start the work right away and hope to work for your project. Looking forward to More

$20 USD in 1 day
(12 Reviews)
4.4
gordanbobic

It sounds like what you are looking for is max_statement_time configuration option. This was introduced in MySQL 5.7.4 and MariaDB 10.1.1. If you are on a version that is older than this, I would be happy to upgrade i More

$10 USD in 1 day
(5 Reviews)
2.5
bhishmindia

let me know if you still having the problem with your script. i can help you to get it fixed. yes and your right . looks like connection details are missing in your script file that way you will able to fix it yourse More

$10 USD in 1 day
(2 Reviews)
0.6
signin2prakash

Hello, I have go through your problem and I can do it in 2 days. Please message me for more discussion.

$15 USD in 2 days
(0 Reviews)
0.0