<?php
$link = mysql_connect('localhost', "mysql_user", "mysql_password");
$status = explode(' ', mysql_stat($link));
print_r($status);
?>
Вышеописанный пример приведёт к следующему результату:
Array
(
[0] => Uptime: 5380
[1] => Threads: 2
[2] => Questions: 1321299
[3] => Slow queries: 0
[4] => Opens: 26
[5] => Flush tables: 1
[6] => Open tables: 17
[7] => Queries per second avg: 245.595
)