All, I have without any issues setup syslog-ng with Mysql using the script that I found called syslog2mysql.sh which is shown below.

#!/bin/bash

if [ ! -e /var/log/mysql.pipe ]
then
        mkfifo /var/log/mysql.pipe
fi
while [ -e /var/log/mysql.pipe ]
do
        mysql -u syslogfeeder --password=ergosum syslog < /var/log/mysql.pipe >/dev/null
done


This works fine with most devices however I have added a new one and no messages are being recieved, this is what happens when I strace the process.

viper:/home/chrisk# strace -p 13232
Process 13232 attached - interrupt to quit
read(0, "INSERT INTO logs\n(host, facility"..., 4096) = 275
read(0, "INSERT INTO logs\n(host, facility"..., 4096) = 275
read(0, "INSERT INTO logs\n(host, facility"..., 4096) = 275
write(2, "ERROR", 5)                    = 5
write(2, " at line 13", 11)             = 11
write(2, ": Unknown command \'\\\'\'.\n", 24) = 24
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
read(3, 0x8060318, 16384)               = -1 EAGAIN (Resource temporarily unavailable)
fcntl64(3, F_SETFL, O_RDWR)             = 0
write(3, "\1\0\0\0\1", 5)               = 5
shutdown(3, 2 /* send and receive */)   = 0
close(3)                                = 0
exit_group(1)                           = ?
Process 13232 detached
viper:/home/chrisk#

The process dies and it restarted with nothing being put into the database. Anyone got any ideas at all??

Regards

Chris K