PHP - To Check Query Process:
Here i will explain how to check the mysql query processing by using php. This function shows you which threads are running.
Here i'm using "SHOW FULL PROCESSLIST" mysql command. This command is very useful if you get the "too many connections" error message and want to find out what is going on. The output shows the current running threads process id. You can use that id to kill that process.
php program is:
mysql_connect("localhost","root",""); // here we set localhost, username and password
$q = mysql_query("SHOW FULL PROCESSLIST"); // here we run the mysql query
echo "<table border='1'>";
while($l = mysql_fetch_row($q) ) {
echo "<tr>";
foreach($l as $val)
echo "<td>$val </td>";
echo "</tr>";
}
echo "</table>";
mysql_close();
Note : The "SHOW FULL PROCESSLIST" command only shows you which
threads are running. If you do not use the FULL keyword, only the first 100 characters of each statement are shown in the Info field.
Here i will explain how to check the mysql query processing by using php. This function shows you which threads are running.
Here i'm using "SHOW FULL PROCESSLIST" mysql command. This command is very useful if you get the "too many connections" error message and want to find out what is going on. The output shows the current running threads process id. You can use that id to kill that process.
php program is:
mysql_connect("localhost","root",""); // here we set localhost, username and password
$q = mysql_query("SHOW FULL PROCESSLIST"); // here we run the mysql query
echo "<table border='1'>";
while($l = mysql_fetch_row($q) ) {
echo "<tr>";
foreach($l as $val)
echo "<td>$val </td>";
echo "</tr>";
}
echo "</table>";
mysql_close();
Note : The "SHOW FULL PROCESSLIST" command only shows you which
threads are running. If you do not use the FULL keyword, only the first 100 characters of each statement are shown in the Info field.