Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Possible to 'Show MySQL Variables' with PHP code onto the browser?

Is this possible:

 mysql_query("SHOW VARIABLES LIKE 'query%'");

in php?

If so how can I display the variables onto the browser?

If it is not possible, which mysql command tool is easiest and free to download?

Thanks


1 Answers

Yes, it's possible, I just tried SHOW VARIABLES LIKE 'max%'

You can show them in the browser like you would show the results from any other query..

$res = mysql_query("SHOW VARIABLES LIKE 'max%'");
while ($row = mysql_fetch_assoc($res)) {
  echo $row['Variable_name'].':'.$row['Value']."<br>\n";
}
like image 116
MSpreij Avatar answered Oct 21 '25 23:10

MSpreij



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!