<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#0050d0">
<font size="-1"><font face="Helvetica, Arial, sans-serif">That would be
the problem then, it does a select to see if the table exists. `select
* from <TABLE> where 0=1`<br>
<br>
-Patrick<br>
</font></font><br>
Sent: Fri Dec 03 2010 12:16:41 GMT-0700 (Mountain Standard Time)<br>
From: Girish-Agarwal (Contractor) <a class="moz-txt-link-rfc2396E" href="mailto:Girish.Agarwal@OfficeDepot.com"><Girish.Agarwal@OfficeDepot.com></a><br>
To: Syslog-ng users' and developers' mailing list
<a class="moz-txt-link-rfc2396E" href="mailto:syslog-ng@lists.balabit.hu"><syslog-ng@lists.balabit.hu></a> <br>
Subject: Re: [syslog-ng] Syslog-ng and Mysql Not working
<blockquote
cite="mid:3B351952C8FD214EBC5B4B779B56EEA1051A9F45@USCHMSX84.na.odcorp.net"
type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta name="Generator" content="Microsoft Word 11 (filtered)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";
        color:#0050D0;}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
pre
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:#0050D0;}
span.EmailStyle18
        {font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
<div class="Section1">
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;">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.</span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;">Regards,</span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;">Girish</span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>
<div>
<div class="MsoNormal" style="text-align: center;" align="center"><font
color="black" face="Times New Roman" size="3"><span
style="font-size: 12pt; color: windowtext;">
<hr tabindex="-1" align="center" size="2" width="100%"></span></font></div>
<p class="MsoNormal"><b><font color="black" face="Tahoma" size="2"><span
style="font-size: 10pt; font-family: Tahoma; color: windowtext; font-weight: bold;">From:</span></font></b><font
color="black" face="Tahoma" size="2"><span
style="font-size: 10pt; font-family: Tahoma; color: windowtext;">
<a class="moz-txt-link-abbreviated" href="mailto:syslog-ng-bounces@lists.balabit.hu">syslog-ng-bounces@lists.balabit.hu</a>
[<a class="moz-txt-link-freetext" href="mailto:syslog-ng-bounces@lists.balabit.hu">mailto:syslog-ng-bounces@lists.balabit.hu</a>] <b><span
style="font-weight: bold;">On
Behalf Of </span></b>Patrick H.<br>
<b><span style="font-weight: bold;">Sent:</span></b> Friday, December
03, 2010
2:03 PM<br>
<b><span style="font-weight: bold;">To:</span></b> Syslog-ng users'
and
developers' mailing list<br>
<b><span style="font-weight: bold;">Subject:</span></b> Re:
[syslog-ng] Syslog-ng
and Mysql Not working</span></font></p>
</div>
<p class="MsoNormal"><font color="#0050d0" face="Times New Roman"
size="3"><span style="font-size: 12pt;"> </span></font></p>
<p class="MsoNormal"><font color="#0050d0" face="Helvetica" size="2"><span
style="font-size: 10pt; font-family: Helvetica;">It will only try to
create the
table if the table does not already exist.<br>
The dont-create-tables flag requires you to use syslog-ng >= 3.2<br>
<br>
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.<br>
<br>
-Patrick<br>
</span></font><br>
Sent: Fri Dec 03 2010 11:25:37 GMT-0700 (Mountain Standard Time)<br>
From: Girish-Agarwal (Contractor) <a moz-do-not-send="true"
href="mailto:Girish.Agarwal@OfficeDepot.com"><Girish.Agarwal@OfficeDepot.com></a><br>
To: Syslog-ng users' and developers' mailing list <a
moz-do-not-send="true" href="mailto:syslog-ng@lists.balabit.hu"><syslog-ng@lists.balabit.hu></a>
<br>
Subject: Re: [syslog-ng] Syslog-ng and Mysql Not working </p>
<pre wrap=""><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">Thanks Again Matthew, I have put in the option but when I restart</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">syslog-ng it gives syntax Error. I have version 3.0.6-SuSE and do you</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">think I require 3.2.x. There should be something in the program where I</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">can just turn off Automatic table creation right without upgrading</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">syslog-ng????. </span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;"> </span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">destination d_mysql {</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;"> sql(type(mysql)</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;"> host("dbhost") port("4406") username("syslog")</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">password("syslog")</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;"> database("testdb")</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;"> table("logs")</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;"> columns("host", "facility", "priority", "tag", "datetime",</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">"program", "server", "msg" )</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;"> values("$HOST_FROM", "$FACILITY", "$PRIORITY", "$TAG",</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">"$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC", "$PROGRAM", "testbox", "$MSG" )</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;"> </span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;"> indexes(),flags("dont-create-tables"));</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">};</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;"> </span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">Regards,</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">Girish</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">-----Original Message-----</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">From: <a moz-do-not-send="true"
href="mailto:syslog-ng-bounces@lists.balabit.hu">syslog-ng-bounces@lists.balabit.hu</a></span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">[<a moz-do-not-send="true"
href="mailto:syslog-ng-bounces@lists.balabit.hu">mailto:syslog-ng-bounces@lists.balabit.hu</a>] On Behalf Of Matthew Hall</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">Sent: Thursday, December 02, 2010 4:10 PM</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">To: Syslog-ng users' and developers' mailing list</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">Subject: Re: [syslog-ng] Syslog-ng and Mysql Not working</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;"> </span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">On Thu, Dec 02, 2010 at 10:12:03AM -0500, Girish-Agarwal (Contractor)</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">wrote:</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;"> </span></font></pre>
<blockquote style="margin-top: 5pt; margin-bottom: 5pt;" type="cite">
<pre wrap=""><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">Thanks Matthew for all your help in trying to get this resolved.</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;"> </span></font></pre>
</blockquote>
<pre wrap=""><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">However</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;"> </span></font></pre>
<blockquote style="margin-top: 5pt; margin-bottom: 5pt;" type="cite">
<pre wrap=""><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">can you kindly let me know where should I add this flag or option, or</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">can you pass a working example :-</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;"> </span></font></pre>
</blockquote>
<pre wrap=""><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;"> </span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">Put flags("dont-create-tables") (or however it's spelled) in the args to</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;"> </span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">sql(..., flags(...));</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;"> </span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;"> </span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;"> </span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;"> </span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;"> </span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">Matthew.</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">________________________________________________________________________</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">____</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;"> </span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;"> </span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">__</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">Member info: <a moz-do-not-send="true"
href="https://lists.balabit.hu/mailman/listinfo/syslog-ng">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a></span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">Documentation:</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;"><a moz-do-not-send="true"
href="http://www.balabit.com/support/documentation/?product=syslog-ng">http://www.balabit.com/support/documentation/?product=syslog-ng</a></span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">FAQ: <a moz-do-not-send="true"
href="http://www.campin.net/syslog-ng/faq.html">http://www.campin.net/syslog-ng/faq.html</a></span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;"> </span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">______________________________________________________________________________</span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">Member info: <a moz-do-not-send="true"
href="https://lists.balabit.hu/mailman/listinfo/syslog-ng">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a></span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">Documentation: <a moz-do-not-send="true"
href="http://www.balabit.com/support/documentation/?product=syslog-ng">http://www.balabit.com/support/documentation/?product=syslog-ng</a></span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;">FAQ: <a moz-do-not-send="true"
href="http://www.campin.net/syslog-ng/faq.html">http://www.campin.net/syslog-ng/faq.html</a></span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;"> </span></font></pre>
<pre><font color="#0050d0" face="Courier New" size="2"><span
style="font-size: 10pt;"> </span></font></pre>
</div>
<pre wrap="">
<hr size="4" width="90%">
______________________________________________________________________________
Member info: <a class="moz-txt-link-freetext" href="https://lists.balabit.hu/mailman/listinfo/syslog-ng">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a>
Documentation: <a class="moz-txt-link-freetext" href="http://www.balabit.com/support/documentation/?product=syslog-ng">http://www.balabit.com/support/documentation/?product=syslog-ng</a>
FAQ: <a class="moz-txt-link-freetext" href="http://www.campin.net/syslog-ng/faq.html">http://www.campin.net/syslog-ng/faq.html</a>
</pre>
</blockquote>
</body>
</html>