Jump to content

Global setting to log all mysql errors (and/or queries)?


Recommended Posts

On MySQL 5.1.47, PHP 5.2.14.


Is there a way to somehow send all mysql errors or queries to a log? I'd like to do this in a global manner, not query-by-query.


I just changed some major functionality, and there are no PHP errors in the error log, but data is missing from the DB so I'm sure there's a mysql error somewhere. So a global setting is clearly ideal here!

Link to comment
Share on other sites

The mysql query log (assuming it is on) shows the actual queries. It does not show the result.


The mysql error log only shows server errors, not query errors (as far as I can tell when I tested with queries that produced things like duplicate keys, queries without data for fields that don't have defaults values...)


Query errors are application level information and it is the responsibility of the application to handle them.



Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.