When MySQL is compiled, there is an option to specify where the unix socket is kept as well as where the datafiles (indices, data and format files) live. If, throughout the life of the database, these need to be moved, you can specify in a config file the new location. Here's an example of a modified /etc/my.cnf file:
--------------------------------------------------------------------------------------------------------------------
[mysqld]
#datadir=/var/lib/mysql
#socket=/var/lib/mysql/mysql.sock
datadir=/new/path/to/mysql
socket=/new/path/to/mysql.sock# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
[mysql.server]
user=mysql
basedir=/var/lib/
basedir=/new/base/dir[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[client]
socket=/new/path/to/mysql.sock--------------------------------------------------------------------------------------------------------------------
The portions in red are the lines I changed from the default to accommodate the new database home. Really all that would be needed is a way to specify an alternate location for the socket file. Perhaps in the "$ModLoad ommysql" line. I'm not entirely sure how rsyslog does it currently. I believe (though I may be mistaken) that when MySQL support is compiled in it takes the location from the mysql_version.h header file. This is the only place that I can find, so far, that specifies the default location for the socket file unless rsyslog somehow queries the running mysqld for this information though I'm not entirely sure how it would do that but I digress...
MySQL Documentation:
Using MySQL Option Files:
http://dev.mysql.com/doc/refman/5.1/en/ ... files.htmlMySQL Options:
http://dev.mysql.com/doc/refman/5.1/en/ ... tions.htmlI hope that helps. If not, let me know if you need more information and I'll see what I can do.