[Snort-users] Problems with MySQL & Snort

Dirk Geschke dirk at ...10648...
Tue Aug 2 15:00:39 EDT 2005

Hi Stevo,

> I'm having problems getting Snort to start because it can't find the 
> mysql socket file.  The error I get is:
> ERROR: database: mysql_error: Can't connect to local MySQL server 
> through socket '/tmp/mysql.sock'
> MySQL is running just fine on this server, but the socket is 
> /var/lib/mysql/mysql.sock.  I attempted to change the socket in my.cnf 
> but that stopped another application I'm using from running (as it's 
> looking for the /var/lib/mysql/mysql.sock), so I need to work out how to 
> get Snort to look for /var/lib/mysql/mysql.sock as the MySQL socket.
> Does anyone have any ideas where that socket is defined in Snort and how 
> I can get around this?

normally you can specify the socket in my.cnf in both parts, the
client and server part. So I guess adjusting the client part
should help.

Otherwise you can do a simple trick: Create a symbolic link pointing
to the right socket:

 ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

This should work without problems...

Best regards


More information about the Snort-users mailing list