Specify a custom mySQL socket file location?

I know Xojo likes to find the socket file at “/tmp/mysql.sock” - is it possible to specify an alternate location somehow?

I know it is possible to create a symbolic link from the actual location into the tmp folder but this keeps getting deleted by the system after a period of time. I would prefer to be able to specify a different location for the file… is that possible or should I file a feature request?

I am replying to my own thread here for someone’s future reference. Here is how to reconfigure the system tmp file cleanup system in RHEL (and probably CentOS) to prevent it from deleting your mysql.sock file periodically.

Edit this file:
/usr/lib/tmpfiles.d/tmp.conf

Add this at the bottom:

# Skip deleting symbolic link for mysql socket
x /tmp/mysql.sock

This assumes that you have created a symbolic link to your socket file at this location using a command like this:

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

I would still however like to find a way to just specify the location of the socket file when using a MySQLCommunityServer connection if there is some way to do it. Anyone know for sure?

<https://xojo.com/issue/38751>

for MBS SQL Plugin you can pass path to that socket instead of IP for connecting.