<div><font color="#222222" face="arial, sans-serif">Very big thanks your help :)</font></div><div><font color="#222222" face="arial, sans-serif"><br></font></div><div><font color="#222222" face="arial, sans-serif">Have nice day :).<br>
</font><br>
<br><div class="gmail_quote">On 9 January 2012 10:36, Gergely Nagy <span dir="ltr">&lt;<a href="mailto:algernon@balabit.hu">algernon@balabit.hu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">Pigri &lt;<a href="mailto:pappdav@gmail.com">pappdav@gmail.com</a>&gt; writes:<br>
<br>
&gt; I have problem for Centos 6.Rebuild syslog-ng package for epel repo,<br>
&gt; because not have SQL support.<br>
<br>
</div>There is SQL support, it&#39;s just your config that&#39;s not entirely correct.<br>
<div class="im"><br>
&gt; Error:<br>
&gt;<br>
&gt; The number of columns and values do not match; len_columns=&#39;10&#39;,<br>
&gt; len_values=&#39;11&#39;<br>
<br>
</div>This tells exactly what the problem is: you have 10 columns specified in<br>
the config (1-10), but 11 values. Add a 11th column, and all will be<br>
fine.<br>
<div class="im"><br>
&gt; destination d_apache_mysql {<br>
&gt; sql(type(mysql)<br>
&gt; host(&quot;localhost&quot;) username(&quot;root&quot;) password(&quot;xxxxx&quot;)<br>
&gt; database(&quot;data&quot;)<br>
&gt; table(&quot;accesslog&quot;)<br>
&gt; columns(&quot;1&quot;, &quot;2&quot;, &quot;3&quot;, &quot;4&quot;, &quot;5&quot;, &quot;6&quot;, &quot;7&quot;, &quot;8&quot;,&quot;9&quot;,&quot;10&quot;)<br>
<br>
</div>10 columns...<br>
<div class="im"><br>
&gt; values(&quot;$APACHE.CLIENT_IP&quot;,&quot;$APACHE.IDENT_NAME&quot;,&quot;$APACHE.USER_NAME&quot;,&quot;$APACHE.TIMESTAMP&quot;,&quot;$APACHE.REQUEST_URL&quot;,&quot;$APACHE.REQUEST_STATUS&quot;,&quot;$APACHE.CONTENT_LENGTH&quot;,&quot;$APACHE.REFERER&quot;,&quot;$APACHE.USER_AGENT&quot;,&quot;$APACHE.VIRTUAL_HOST&quot;,&quot;$APACHE.SERVER_NAME&quot;)<br>

<br>
</div>11 values.<br>
<br>
The number of items in the columns() and values() options MUST be the<br>
same, otherwise syslog-ng can&#39;t construct a valid SQL insert statement.<br>
<div class="im"><br>
&gt; indexes(&quot;1&quot;, &quot;2&quot;, &quot;3&quot;, &quot;4&quot;, &quot;5&quot;, &quot;6&quot;, &quot;7&quot;, &quot;8&quot;,&quot;9&quot;,&quot;10&quot;));<br>
<br>
</div>If you index every column, that will be slow as a snail.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
|8]<br>
<br>
______________________________________________________________________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
<br>
</font></span></blockquote></div><br></div>