Please how can we discover ussing Linux command line (shell/cli) what are the exact mysql commands used when this error was generated?

Is there any way to track which functions caused this so we can optimise it?

Database error in vBulletin :

mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: User ilforum_userilf already has more than 'max_user_connections' active connections
/home/ilforum/public_html/includes/class_core.php on line 317