PHP – MySQL Processes Information

The given PHP example helps you to get the info of all mysql processes.

Code Example:
<?php
$server = "localhost";
$username = "root";
$password = "";
 
$conn =  mysql_connect($server, $username, $password) or die("Couldn't connect to MySQL" . mysql_error());
$processes = mysql_list_processes();
echo "<table>";
echo "<tr><th>ID</th><th>User</th><th>Host</th><th>DB</th>
  <th>Command</th><th>Time</th><th>State</th><th>Info</th>
  </tr>";

while ($row = mysql_fetch_row($processes)) {
  list($id,$user,$host,$db,$command,$time,$state,$info) = $row;
  echo "<tr><td>$id</td><td>$user</td>
	 <td>$host</td><td>$db</td><td>$command</td>
	 <td>$time</td><td>$state</td><td>$info</td>
	 </tr>";
}
echo "</table>";
mysql_close($conn);
?>

Post to Twitter Post to Digg Post to Facebook Post to Google Buzz Send Gmail

2 Comments

  1. avatarNora Godley

    Hello There,

    Are you using WordPress/Woocommerce or maybe do you actually project to make use of it someday ? We offer around 2500 premium plugins and additionally themes free to get : http://ezurl.xyz/1mjOO

    Thanks,

    Nora

  2. avatarAlan Wagner

    Hi fellow entrepreneur,

    Did you know that 95% of people who try forex trading fail?

    Yep. It’s the horrible truth. The main reasons why they fail are:

    – They learn the free stuff straight off Google.
    – They don’t know how to manage their risk.
    – They expect a get rich quick ‘overnight success’

    The amazing news is I’ve created a brand new masterclass video which shows you exactly how to solve all these problems – fast, easy and most importantly – for FREE!

    Click Here Right Now To See It –> https://bit.ly/fasttrackforexonline-webinar

    I’ll see you over there.

    Thanks,

    Hither Mann
    Founder & CEO Fortune Academy

    P.S. No business should ever put all their eggs in one basket. This training will open your eyes to what’s possible in the world of FX trading and I’m sure you will never look back.

Leave a Comment

Your email address will not be published. Required fields are marked *