[syslog-ng] syslog - sql error

Gergely Nagy algernon at balabit.hu
Tue Dec 3 12:23:31 CET 2013


Hi

vijay <bhaskarpeddi at gmail.com> writes:

> HI All,
>
>   Iam using syslog-ng3.2.5  rpm in centos x86_64 environment.Past days it
> is  working well.Suddenly iam seeing a problem in writing to mysql
>
> Error running SQL query; type='mysql', host='192.168.9.68', port='3306',
> user='cygnet', database='CygNetDB', error='1072: Key column \'date\'
> doesn\'t exist in table', query='CREATE INDEX SYSLOGS_20131130_date_idx ON
> SYSLOGS_20131130 (date)'

The reason here is as the error says: there's no 'date' column on the
table you're trying to create an index for. You may wish to check that
the fields specified in your indexes() setting actually exist in
fields() too.

> Error running SQL query; type='mysql', host='192.168.9.68', port='3306',
> user='cygnet', database='CygNetDB', error='1170: BLOB/TEXT column
> \'facility\' used in key specification without a key length', query='CREATE
> INDEX SYSLOGS_20131130_facility_idx ON SYSLOGS_20131130 (facility)'

This is another error, which should be fairly clear from the error
message: the facility column is of BLOB/TEXT type, but with no length
specified, and your mysql seems to need a length. You can alter the
table to add an explicit length, and the problem should go away.

Why it started to happen now, and not before, is another question. The
most likely reason would be a MySQL upgrade, or a config change.

-- 
|8]



More information about the syslog-ng mailing list