Hi, We are trying to setup syslog-ng to directly log messages to mysql but I get the following Error in the client messages file:- Dec 1 14:45:27 testbox syslog-ng[15637]: Error running SQL query; type='mysql', host='10.10.10.10', port='4406', user='syslog', database='testdb', error='1142: create command denied to user: \'syslog@10.20.30.40\' for table \'logs\'', query='CREATE TABLE logs (host text, facility text, priority text, tag text, datetime text, program text, server text, msg text)' Dec 1 14:45:27 testbox syslog-ng[15637]: Error checking table, disconnecting from database, trying again shortly; time_reopen='60' I am really confused as to why it is trying to create Table into the database. I already have the table created and I have verified successful connection from this box to the database server. It needs to insert the entries into the database and should not try to CREATE TABLE. I am using syslog-ng 3.0.6 version . Regards, Girish
See this: http://www.engardelinux.org/modules/index/list_archives.cgi?list=syslog-ng-u... You need the dont-create-tables flag. Which for some weird reason is still not in the 3.2 manual. Matthew. On Wed, Dec 01, 2010 at 02:57:59PM -0500, Girish-Agarwal (Contractor) wrote:
Hi, We are trying to setup syslog-ng to directly log messages to mysql but I get the following Error in the client messages file:-
Dec 1 14:45:27 testbox syslog-ng[15637]: Error running SQL query; type='mysql', host='10.10.10.10', port='4406', user='syslog', database='testdb', error='1142: create command denied to user: \'syslog@10.20.30.40\' for table \'logs\'', query='CREATE TABLE logs (host text, facility text, priority text, tag text, datetime text, program text, server text, msg text)' Dec 1 14:45:27 testbox syslog-ng[15637]: Error checking table, disconnecting from database, trying again shortly; time_reopen='60'
I am really confused as to why it is trying to create Table into the database. I already have the table created and I have verified successful connection from this box to the database server. It needs to insert the entries into the database and should not try to CREATE TABLE.
I am using syslog-ng 3.0.6 version .
Regards, Girish
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html
Thanks Matthew for all your help in trying to get this resolved. However can you kindly let me know where should I add this flag or option, or can you pass a working example :- Here are my options from syslog-ng.conf file. options { stats_freq(3600); keep_hostname(yes); flush_lines(16); log_fifo_size(16384); }; And here is the destination mysql directive destination d_mysql { sql(type(mysql) host("dbhost") port("4406") username("syslog") password("syslog") database("testdb") table("logs") columns("host", "facility", "priority", "tag", "datetime", "program", "server", "msg" ) values("$HOST_FROM", "$FACILITY", "$PRIORITY", "$TAG", "$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC", "$PROGRAM", "testbox", "$MSG" ) indexes()); }; Regards, Girish -----Original Message----- From: syslog-ng-bounces@lists.balabit.hu [mailto:syslog-ng-bounces@lists.balabit.hu] On Behalf Of Matthew Hall Sent: Wednesday, December 01, 2010 5:57 PM To: Syslog-ng users' and developers' mailing list Subject: Re: [syslog-ng] Syslog-ng and Mysql Not working See this: http://www.engardelinux.org/modules/index/list_archives.cgi?list=syslog- ng-users&page=0102.html&month=2010-11 You need the dont-create-tables flag. Which for some weird reason is still not in the 3.2 manual. Matthew. On Wed, Dec 01, 2010 at 02:57:59PM -0500, Girish-Agarwal (Contractor) wrote:
Hi, We are trying to setup syslog-ng to directly log messages to mysql but I get the following Error in the client messages file:-
Dec 1 14:45:27 testbox syslog-ng[15637]: Error running SQL query; type='mysql', host='10.10.10.10', port='4406', user='syslog', database='testdb', error='1142: create command denied to user: \'syslog@10.20.30.40\' for table \'logs\'', query='CREATE TABLE logs (host text, facility text, priority text, tag text, datetime text, program text, server text, msg text)' Dec 1 14:45:27 testbox syslog-ng[15637]: Error checking table, disconnecting from database, trying again shortly; time_reopen='60'
I am really confused as to why it is trying to create Table into the database. I already have the table created and I have verified successful connection from this box to the database server. It needs to insert the entries into the database and should not try to CREATE TABLE.
I am using syslog-ng 3.0.6 version .
Regards, Girish
________________________________________________________________________ ______
Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html
________________________________________________________________________ ______ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html
On Thu, Dec 02, 2010 at 10:12:03AM -0500, Girish-Agarwal (Contractor) wrote:
Thanks Matthew for all your help in trying to get this resolved. However can you kindly let me know where should I add this flag or option, or can you pass a working example :-
Put flags("dont-create-tables") (or however it's spelled) in the args to sql(..., flags(...)); Matthew.
Thanks Again Matthew, I have put in the option but when I restart syslog-ng it gives syntax Error. I have version 3.0.6-SuSE and do you think I require 3.2.x. There should be something in the program where I can just turn off Automatic table creation right without upgrading syslog-ng????. destination d_mysql { sql(type(mysql) host("dbhost") port("4406") username("syslog") password("syslog") database("testdb") table("logs") columns("host", "facility", "priority", "tag", "datetime", "program", "server", "msg" ) values("$HOST_FROM", "$FACILITY", "$PRIORITY", "$TAG", "$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC", "$PROGRAM", "testbox", "$MSG" ) indexes(),flags("dont-create-tables")); }; Regards, Girish -----Original Message----- From: syslog-ng-bounces@lists.balabit.hu [mailto:syslog-ng-bounces@lists.balabit.hu] On Behalf Of Matthew Hall Sent: Thursday, December 02, 2010 4:10 PM To: Syslog-ng users' and developers' mailing list Subject: Re: [syslog-ng] Syslog-ng and Mysql Not working On Thu, Dec 02, 2010 at 10:12:03AM -0500, Girish-Agarwal (Contractor) wrote:
Thanks Matthew for all your help in trying to get this resolved. However can you kindly let me know where should I add this flag or option, or can you pass a working example :-
Put flags("dont-create-tables") (or however it's spelled) in the args to sql(..., flags(...)); Matthew. ________________________________________________________________________ ____ __ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html
It will only try to create the table if the table does not already exist. The dont-create-tables flag requires you to use syslog-ng >= 3.2 Even if you upgrade to 3.2 and turn this option on, it will still be broken as it wont have anything to insert into. You should investigate why syslog-ng thinks the table doesnt exist. -Patrick Sent: Fri Dec 03 2010 11:25:37 GMT-0700 (Mountain Standard Time) From: Girish-Agarwal (Contractor) <Girish.Agarwal@OfficeDepot.com> To: Syslog-ng users' and developers' mailing list <syslog-ng@lists.balabit.hu> Subject: Re: [syslog-ng] Syslog-ng and Mysql Not working
Thanks Again Matthew, I have put in the option but when I restart syslog-ng it gives syntax Error. I have version 3.0.6-SuSE and do you think I require 3.2.x. There should be something in the program where I can just turn off Automatic table creation right without upgrading syslog-ng????.
destination d_mysql { sql(type(mysql) host("dbhost") port("4406") username("syslog") password("syslog") database("testdb") table("logs") columns("host", "facility", "priority", "tag", "datetime", "program", "server", "msg" ) values("$HOST_FROM", "$FACILITY", "$PRIORITY", "$TAG", "$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC", "$PROGRAM", "testbox", "$MSG" )
indexes(),flags("dont-create-tables")); };
Regards, Girish -----Original Message----- From: syslog-ng-bounces@lists.balabit.hu [mailto:syslog-ng-bounces@lists.balabit.hu] On Behalf Of Matthew Hall Sent: Thursday, December 02, 2010 4:10 PM To: Syslog-ng users' and developers' mailing list Subject: Re: [syslog-ng] Syslog-ng and Mysql Not working
On Thu, Dec 02, 2010 at 10:12:03AM -0500, Girish-Agarwal (Contractor) wrote:
Thanks Matthew for all your help in trying to get this resolved.
However
can you kindly let me know where should I add this flag or option, or can you pass a working example :-
Put flags("dont-create-tables") (or however it's spelled) in the args to
sql(..., flags(...));
Matthew. ________________________________________________________________________ ____
__ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html
Thanks Patrick. Is there any Pointer you can provide as to why it would think it needs to create the table. I have used the credentials supplied to syslog-ng and used mysql client to execute the login and it works fine. The only thing is that the mysql user(syslog) only has INSERT right to the table to which it is supposed to write logs. It does not even have SELECT right to the table. Regards, Girish ________________________________ From: syslog-ng-bounces@lists.balabit.hu [mailto:syslog-ng-bounces@lists.balabit.hu] On Behalf Of Patrick H. Sent: Friday, December 03, 2010 2:03 PM To: Syslog-ng users' and developers' mailing list Subject: Re: [syslog-ng] Syslog-ng and Mysql Not working It will only try to create the table if the table does not already exist. The dont-create-tables flag requires you to use syslog-ng >= 3.2 Even if you upgrade to 3.2 and turn this option on, it will still be broken as it wont have anything to insert into. You should investigate why syslog-ng thinks the table doesnt exist. -Patrick Sent: Fri Dec 03 2010 11:25:37 GMT-0700 (Mountain Standard Time) From: Girish-Agarwal (Contractor) <Girish.Agarwal@OfficeDepot.com> <mailto:Girish.Agarwal@OfficeDepot.com> To: Syslog-ng users' and developers' mailing list <syslog-ng@lists.balabit.hu> <mailto:syslog-ng@lists.balabit.hu> Subject: Re: [syslog-ng] Syslog-ng and Mysql Not working Thanks Again Matthew, I have put in the option but when I restart syslog-ng it gives syntax Error. I have version 3.0.6-SuSE and do you think I require 3.2.x. There should be something in the program where I can just turn off Automatic table creation right without upgrading syslog-ng????. destination d_mysql { sql(type(mysql) host("dbhost") port("4406") username("syslog") password("syslog") database("testdb") table("logs") columns("host", "facility", "priority", "tag", "datetime", "program", "server", "msg" ) values("$HOST_FROM", "$FACILITY", "$PRIORITY", "$TAG", "$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC", "$PROGRAM", "testbox", "$MSG" ) indexes(),flags("dont-create-tables")); }; Regards, Girish -----Original Message----- From: syslog-ng-bounces@lists.balabit.hu [mailto:syslog-ng-bounces@lists.balabit.hu] On Behalf Of Matthew Hall Sent: Thursday, December 02, 2010 4:10 PM To: Syslog-ng users' and developers' mailing list Subject: Re: [syslog-ng] Syslog-ng and Mysql Not working On Thu, Dec 02, 2010 at 10:12:03AM -0500, Girish-Agarwal (Contractor) wrote: Thanks Matthew for all your help in trying to get this resolved. However can you kindly let me know where should I add this flag or option, or can you pass a working example :- Put flags("dont-create-tables") (or however it's spelled) in the args to sql(..., flags(...)); Matthew. ________________________________________________________________________ ____ __ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html ________________________________________________________________________ ______ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html
That would be the problem then, it does a select to see if the table exists. `select * from <TABLE> where 0=1` -Patrick Sent: Fri Dec 03 2010 12:16:41 GMT-0700 (Mountain Standard Time) From: Girish-Agarwal (Contractor) <Girish.Agarwal@OfficeDepot.com> To: Syslog-ng users' and developers' mailing list <syslog-ng@lists.balabit.hu> Subject: Re: [syslog-ng] Syslog-ng and Mysql Not working
Thanks Patrick. Is there any Pointer you can provide as to why it would think it needs to create the table. I have used the credentials supplied to syslog-ng and used mysql client to execute the login and it works fine. The only thing is that the mysql user(syslog) only has INSERT right to the table to which it is supposed to write logs. It does not even have SELECT right to the table.
Regards,
Girish
------------------------------------------------------------------------
*From:* syslog-ng-bounces@lists.balabit.hu [mailto:syslog-ng-bounces@lists.balabit.hu] *On Behalf Of *Patrick H. *Sent:* Friday, December 03, 2010 2:03 PM *To:* Syslog-ng users' and developers' mailing list *Subject:* Re: [syslog-ng] Syslog-ng and Mysql Not working
It will only try to create the table if the table does not already exist. The dont-create-tables flag requires you to use syslog-ng >= 3.2
Even if you upgrade to 3.2 and turn this option on, it will still be broken as it wont have anything to insert into. You should investigate why syslog-ng thinks the table doesnt exist.
-Patrick
Sent: Fri Dec 03 2010 11:25:37 GMT-0700 (Mountain Standard Time) From: Girish-Agarwal (Contractor) <Girish.Agarwal@OfficeDepot.com> <mailto:Girish.Agarwal@OfficeDepot.com> To: Syslog-ng users' and developers' mailing list <syslog-ng@lists.balabit.hu> <mailto:syslog-ng@lists.balabit.hu> Subject: Re: [syslog-ng] Syslog-ng and Mysql Not working
Thanks Again Matthew, I have put in the option but when I restart syslog-ng it gives syntax Error. I have version 3.0.6-SuSE and do you think I require 3.2.x. There should be something in the program where I can just turn off Automatic table creation right without upgrading syslog-ng????.
destination d_mysql { sql(type(mysql) host("dbhost") port("4406") username("syslog") password("syslog") database("testdb") table("logs") columns("host", "facility", "priority", "tag", "datetime", "program", "server", "msg" ) values("$HOST_FROM", "$FACILITY", "$PRIORITY", "$TAG", "$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC", "$PROGRAM", "testbox", "$MSG" )
indexes(),flags("dont-create-tables")); };
Regards, Girish -----Original Message----- From: syslog-ng-bounces@lists.balabit.hu <mailto:syslog-ng-bounces@lists.balabit.hu> [mailto:syslog-ng-bounces@lists.balabit.hu] On Behalf Of Matthew Hall Sent: Thursday, December 02, 2010 4:10 PM To: Syslog-ng users' and developers' mailing list Subject: Re: [syslog-ng] Syslog-ng and Mysql Not working
On Thu, Dec 02, 2010 at 10:12:03AM -0500, Girish-Agarwal (Contractor) wrote:
Thanks Matthew for all your help in trying to get this resolved.
However
can you kindly let me know where should I add this flag or option, or can you pass a working example :-
Put flags("dont-create-tables") (or however it's spelled) in the args to
sql(..., flags(...));
Matthew. ________________________________________________________________________ ____
__ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html
------------------------------------------------------------------------
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html
It still has the same problem Patrick. Again I have verified that the mysql user ( syslog ) from the host has the Select, insert permissions on the database but it still tries to create the table. This is the version of syslog-ng I am using syslog-ng-3.1.3-1.suse10. --Girish ________________________________ From: syslog-ng-bounces@lists.balabit.hu [mailto:syslog-ng-bounces@lists.balabit.hu] On Behalf Of Patrick H. Sent: Friday, December 03, 2010 2:46 PM To: Syslog-ng users' and developers' mailing list Subject: Re: [syslog-ng] Syslog-ng and Mysql Not working That would be the problem then, it does a select to see if the table exists. `select * from <TABLE> where 0=1` -Patrick Sent: Fri Dec 03 2010 12:16:41 GMT-0700 (Mountain Standard Time) From: Girish-Agarwal (Contractor) <Girish.Agarwal@OfficeDepot.com> <mailto:Girish.Agarwal@OfficeDepot.com> To: Syslog-ng users' and developers' mailing list <syslog-ng@lists.balabit.hu> <mailto:syslog-ng@lists.balabit.hu> Subject: Re: [syslog-ng] Syslog-ng and Mysql Not working Thanks Patrick. Is there any Pointer you can provide as to why it would think it needs to create the table. I have used the credentials supplied to syslog-ng and used mysql client to execute the login and it works fine. The only thing is that the mysql user(syslog) only has INSERT right to the table to which it is supposed to write logs. It does not even have SELECT right to the table. Regards, Girish ________________________________ From: syslog-ng-bounces@lists.balabit.hu [mailto:syslog-ng-bounces@lists.balabit.hu] On Behalf Of Patrick H. Sent: Friday, December 03, 2010 2:03 PM To: Syslog-ng users' and developers' mailing list Subject: Re: [syslog-ng] Syslog-ng and Mysql Not working It will only try to create the table if the table does not already exist. The dont-create-tables flag requires you to use syslog-ng >= 3.2 Even if you upgrade to 3.2 and turn this option on, it will still be broken as it wont have anything to insert into. You should investigate why syslog-ng thinks the table doesnt exist. -Patrick Sent: Fri Dec 03 2010 11:25:37 GMT-0700 (Mountain Standard Time) From: Girish-Agarwal (Contractor) <Girish.Agarwal@OfficeDepot.com> <mailto:Girish.Agarwal@OfficeDepot.com> To: Syslog-ng users' and developers' mailing list <syslog-ng@lists.balabit.hu> <mailto:syslog-ng@lists.balabit.hu> Subject: Re: [syslog-ng] Syslog-ng and Mysql Not working Thanks Again Matthew, I have put in the option but when I restart syslog-ng it gives syntax Error. I have version 3.0.6-SuSE and do you think I require 3.2.x. There should be something in the program where I can just turn off Automatic table creation right without upgrading syslog-ng????. destination d_mysql { sql(type(mysql) host("dbhost") port("4406") username("syslog") password("syslog") database("testdb") table("logs") columns("host", "facility", "priority", "tag", "datetime", "program", "server", "msg" ) values("$HOST_FROM", "$FACILITY", "$PRIORITY", "$TAG", "$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC", "$PROGRAM", "testbox", "$MSG" ) indexes(),flags("dont-create-tables")); }; Regards, Girish -----Original Message----- From: syslog-ng-bounces@lists.balabit.hu [mailto:syslog-ng-bounces@lists.balabit.hu] On Behalf Of Matthew Hall Sent: Thursday, December 02, 2010 4:10 PM To: Syslog-ng users' and developers' mailing list Subject: Re: [syslog-ng] Syslog-ng and Mysql Not working On Thu, Dec 02, 2010 at 10:12:03AM -0500, Girish-Agarwal (Contractor) wrote: Thanks Matthew for all your help in trying to get this resolved. However can you kindly let me know where should I add this flag or option, or can you pass a working example :- Put flags("dont-create-tables") (or however it's spelled) in the args to sql(..., flags(...)); Matthew. ________________________________________________________________________ ____ __ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html ________________________________________________________________________ ______ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html ________________________________ ________________________________________________________________________ ______ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html
On Mon, Dec 06, 2010 at 12:06:59PM -0500, Girish-Agarwal (Contractor) wrote:
It still has the same problem Patrick. Again I have verified that the mysql user ( syslog ) from the host has the Select, insert permissions on the database but it still tries to create the table. This is the version of syslog-ng I am using syslog-ng-3.1.3-1.suse10.
Patrick already answered that before:
The dont-create-tables flag requires you to use syslog-ng >= 3.2
Matthew.
Verify you can run that select query (SELECT * FROM <TABLE> WHERE 0=1) from the user syslog-ng is using. If that query fails for any reason it will try to create the table (empty results are expected, just as long as there is no error). (afsql.c:383 & :409 of the 3.1.0 source). You might also try increasing the verbosity of mysql's logging so that it dumps out every single query that gets executed. Maybe see if there's anything fishy looking in it. -Patrick Sent: Mon Dec 06 2010 10:06:59 GMT-0700 (Mountain Standard Time) From: Girish-Agarwal (Contractor) <Girish.Agarwal@OfficeDepot.com> To: Syslog-ng users' and developers' mailing list <syslog-ng@lists.balabit.hu> Subject: Re: [syslog-ng] Syslog-ng and Mysql Not working
It still has the same problem Patrick. Again I have verified that the mysql user ( syslog ) from the host has the Select, insert permissions on the database but it still tries to create the table. This is the version of syslog-ng I am using syslog-ng-3.1.3-1.suse10.
--Girish
------------------------------------------------------------------------
*From:* syslog-ng-bounces@lists.balabit.hu [mailto:syslog-ng-bounces@lists.balabit.hu] *On Behalf Of *Patrick H. *Sent:* Friday, December 03, 2010 2:46 PM *To:* Syslog-ng users' and developers' mailing list *Subject:* Re: [syslog-ng] Syslog-ng and Mysql Not working
That would be the problem then, it does a select to see if the table exists. `select * from <TABLE> where 0=1`
-Patrick
Sent: Fri Dec 03 2010 12:16:41 GMT-0700 (Mountain Standard Time) From: Girish-Agarwal (Contractor) <Girish.Agarwal@OfficeDepot.com> <mailto:Girish.Agarwal@OfficeDepot.com> To: Syslog-ng users' and developers' mailing list <syslog-ng@lists.balabit.hu> <mailto:syslog-ng@lists.balabit.hu> Subject: Re: [syslog-ng] Syslog-ng and Mysql Not working
Thanks Patrick. Is there any Pointer you can provide as to why it would think it needs to create the table. I have used the credentials supplied to syslog-ng and used mysql client to execute the login and it works fine. The only thing is that the mysql user(syslog) only has INSERT right to the table to which it is supposed to write logs. It does not even have SELECT right to the table.
Regards,
Girish
------------------------------------------------------------------------
*From:* syslog-ng-bounces@lists.balabit.hu <mailto:syslog-ng-bounces@lists.balabit.hu> [mailto:syslog-ng-bounces@lists.balabit.hu] *On Behalf Of *Patrick H. *Sent:* Friday, December 03, 2010 2:03 PM *To:* Syslog-ng users' and developers' mailing list *Subject:* Re: [syslog-ng] Syslog-ng and Mysql Not working
It will only try to create the table if the table does not already exist. The dont-create-tables flag requires you to use syslog-ng >= 3.2
Even if you upgrade to 3.2 and turn this option on, it will still be broken as it wont have anything to insert into. You should investigate why syslog-ng thinks the table doesnt exist.
-Patrick
Sent: Fri Dec 03 2010 11:25:37 GMT-0700 (Mountain Standard Time) From: Girish-Agarwal (Contractor) <Girish.Agarwal@OfficeDepot.com> <mailto:Girish.Agarwal@OfficeDepot.com> To: Syslog-ng users' and developers' mailing list <syslog-ng@lists.balabit.hu> <mailto:syslog-ng@lists.balabit.hu> Subject: Re: [syslog-ng] Syslog-ng and Mysql Not working
Thanks Again Matthew, I have put in the option but when I restart syslog-ng it gives syntax Error. I have version 3.0.6-SuSE and do you think I require 3.2.x. There should be something in the program where I can just turn off Automatic table creation right without upgrading syslog-ng????.
destination d_mysql { sql(type(mysql) host("dbhost") port("4406") username("syslog") password("syslog") database("testdb") table("logs") columns("host", "facility", "priority", "tag", "datetime", "program", "server", "msg" ) values("$HOST_FROM", "$FACILITY", "$PRIORITY", "$TAG", "$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC", "$PROGRAM", "testbox", "$MSG" )
indexes(),flags("dont-create-tables")); };
Regards, Girish -----Original Message----- From: syslog-ng-bounces@lists.balabit.hu <mailto:syslog-ng-bounces@lists.balabit.hu> [mailto:syslog-ng-bounces@lists.balabit.hu] On Behalf Of Matthew Hall Sent: Thursday, December 02, 2010 4:10 PM To: Syslog-ng users' and developers' mailing list Subject: Re: [syslog-ng] Syslog-ng and Mysql Not working
On Thu, Dec 02, 2010 at 10:12:03AM -0500, Girish-Agarwal (Contractor) wrote:
Thanks Matthew for all your help in trying to get this resolved.
However
can you kindly let me know where should I add this flag or option, or can you pass a working example :-
Put flags("dont-create-tables") (or however it's spelled) in the args to
sql(..., flags(...));
Matthew. ________________________________________________________________________ ____
__ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html
------------------------------------------------------------------------
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html
------------------------------------------------------------------------
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html
participants (3)
-
Girish-Agarwal (Contractor)
-
Matthew Hall
-
Patrick H.