[syslog-ng]syslog-ng mysql syntax error

Asif Iqbal syslog-ng@lists.balabit.hu
Wed, 7 Jan 2004 08:47:25 -0500


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Asif Iqbal wrote:
> Hi All
> 
> Since yesterday I am getting this syntax errors while pushing the log to
> the mysql database
> 
> I followed the instruction exactly how it was said in
> http://vermeer.org/syslog/ and it was working fine until today it
> started complaining
> 
> ERROR 1064 at line 841: 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 'level, tag, date,
> time, program, msg) VALUES ( '63.152.4.63', '
> ERROR 1064 at line 1: 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 '/22/3 session 4612f4 Session End' );
> INSERT INTO logs (host, fa
> ERROR 1064 at line 424: 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 '63.152.0.100', 'local4', 'err', 'err', 'a3',
> '2003-12-31', '17:

I realize if there is any apostrophe (') in my syslog it fails to insert
into the mysql database when trying to pipe. Anyone else faced this
issue? I am tempted to switch to buffer or program method to do the push
to the database

- -- 
Asif Iqbal
PGP Key: E62693C5
There's no place like 127.0.0.1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (SunOS)

iD8DBQE//A3tUAgaF+Ymk8URAjFOAJ95Paue02t8dRN37lf8NTOBWlEI1wCeOsRh
XajIUQ2pwgK84Xp5ZNn76Dc=
=cxos
-----END PGP SIGNATURE-----