Russell-IO / php-syslog-ng

Automatically exported from code.google.com/p/php-syslog-ng
1 stars 0 forks source link

Can't connect to local MySQL server through socket when using syslog-ng v3.x #151

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Using syslog-ng v3.x

What is the expected output? What do you see instead?
db_insert.pl dies whith a message similar to:
"Can't connect to local MySQL server through socket '/var/run/mysqld/
mysqld.sock' (2)"

Which is a bit odd, given that my MySQL pipe is located at /var/lib/
mysql/mysql.sock. altering the connect line (in db_insert.pl) to read:

my $dbh = DBI->connect( "DBI:mysql:$db:mysql_socket=/var/lib/mysql/
mysql.sock", $dbuser, $dbpass)

will make the db_insert script work properly.

I can't see why it's picking up that socket setting at all when it's
being given a port number.

To test whether this is the error you are receiving, please make sure you 
have DEBUG set to TRUE in your logzilla config.php file and restart syslog-
ng. Once that is done, run "./db_insert.pl -s" to generate a self test and 
check the contents of /var/log/logzilla/db_insert.pl for any errors.

Original issue reported on code.google.com by cdu...@gmail.com on 30 Oct 2009 at 3:32