Re: server-side logging of query errors?
- Date: Tue, 23 Jun 2015 10:29:38 +0200 (CEST)
- From: Johan De Meersman <vegivamp@xxxxxxxxx>
- Subject: Re: server-side logging of query errors?
None that I'm aware of. It would be a mild security risk; a malicious (or just stupid, see Hanlon's razor) user could spam your server with malformed requests until the logging disk runs full, at which point the daemon would suspend operations until space is freed.
Maybe one of the proxies out there has support for such logging, I'm not really familiar with any of them.
----- Original Message -----
> From: "Tomasz Chmielewski" <mangoo@xxxxxxxx>
> To: "MySql" <mysql@xxxxxxxxxxxxxxx>
> Sent: Tuesday, 23 June, 2015 09:35:46
> Subject: server-side logging of query errors?
> Suppose I run a query which has a syntax error:
> mysql> blah;
> ERROR 1064 (42000): You have an error in your SQL syntax; check the
> manual that corresponds to your MySQL server version for the right
> syntax to use near 'blah' at line 1
> How can I get mysql server to log this error?
> According to the documentation:
> - "Error log" - will only log mysqld errors - so, it won't log syntax
> errors in the query
> - "General query log" - it will log all queries, but without indicating
> if it was an error or not
> Is there a way to log query syntax errors on the server? Please assume
> that connection and the query can be coming from PHP, perl etc. code, so
> any "/usr/bin/mysql" stderr output redirecting is not helping here.
> Tomasz Chmielewski
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql
Unhappiness is discouraged and will be corrected with kitten pictures.
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql