Snort mailing list archives

trouble connecting barnyard to a remote mysql database.


From: Timothy W Morrison <morriswt () us ibm com>
Date: Mon, 7 Jun 2004 13:34:27 -0500

Hello,
I am currently having problems getting barnyard to log to a remote mysql 
database. My barnyard configuration file has the proper line uncommented 
to allow for logging to the remote mysql database.

In /var/log/messages I get two errors:

1) Jun  7 11:52:04 snortlog barnyard: FATAL ERROR: Failed to connect to 
database snort:XXXXXXXX@localhost/snort: Can't connect to local MySQL 
server through socket '/var/lib/mysql/mysql.sock' (2)

That is what I get when I set the hostname to localhost.

2)Jun  7 11:36:43 snortlog barnyard: FATAL ERROR: Failed to connect to 
database snort:XXXXXXXX () server-name com:3306/snort: Unknown MySQL Server 
Host 'server-name.com:3306'

I get #2 when I use the actual hostname/IP of the server that has the 
MySQL database on it.

Additional Information:

I have port 3306 forwarded to the MySQL server. Is this necessary? Also, I 
have setup the proper priviliges for the MySQL user to log in from any 
host. My question is: What do I put for the hostname in the barnyard.conf 
file?

Currently my output plugin for barnyard looks like: 

output alert_acid_db: mysql, sensor_id 1, database snort, server 
localhost, user *****, password ********

I appreciate your time and help.

Thanks!

Tim Morrison

Current thread: