Monitor MySQL DB Queries

Avatar
  • Answered
Hi,

I am trying to find a way to monitor all queries that are passed into my DB. I know you can easily change the mysql config file to output everything to the log, but how do I accomplish that inside inmotion's cpanel?

Thanks
Avatar
BradM
Hi hiya83,

Within the mysql configuration file, you can configure MySQL to log all queries to a file. This logging can only be done server wide, meaning we can't log all SQL queries from only one account. Because this logging can be quite taxing on the server, it is unavailable to users on the shared platform. If you were on a VPS or dedicated hosting server, we would be able to set this up for you.

I looked at your website, and based upon your source code it appears that you are running Joomla 1.7. There may be a way to update the core MySQL calls in Joomla so that it logs all the queries either before or after they're ran, but this would involve editing source code which may cause unforeseen problems.

Is there a specific reason you're trying to log all queries? If you wanted to post a comment at the bottom of this page with a bit more information, we may be able to find a viable solution for you.

Thanks!
- Brad