How can I see how many connections have been opened during the current request via mysql_connect in PHP running on Apache?
I know that if I call m
I think there are a couple of ways:
SHOW STATUS WHERE `variable_name` = 'Threads_connected'
or you can do a SHOW PROCESSLIST and find out unique values in the Id column. In old PHP API mysql, there is mysql_list_processes function that does the same as SHOW PROCESSLIST, too.
But first one should work for you. And perhaps you might like to check on other STATUS variables