Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got mysql logging log_slow_queries or whatever, and had turned on all query logging for a moment before I found it to just be spammy and thus useless.

How can I log only mysql queries that result in syntax errors?

share|improve this question
You should look at the general log: – Raisen Apr 11 '11 at 22:48
Right, I should have been more clear that I already checked that log out, I was hoping that there was a way to view queries with improper syntax and ignore queries that have the proper syntax. Because viewing everything in the log is so spammy that it's useless. – Kzqai Apr 11 '11 at 22:54
All I can suggest to better filter the queries is to store them in a table instead of a file. I am not sure about a specific error log option in MySQL. – Raisen Apr 11 '11 at 23:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.