Install link to mysql unix socket

Default mysql socket for Fedora/RHEL mysql client lib is
/var/lib/mysql/mysql.sock.  Although we change this path in a mysql
config file, it's not sufficient because some clients don't read any
mysql config and just use default socket path.

For Fedora/RHEL this patch installs a link at the origional path.

Change-Id: Id46961278c9d33d04d555f14d8334c5fe2cb23c7
This commit is contained in:
Jan Provaznik 2014-01-07 06:53:28 -05:00 committed by Derek Higgins
parent 76a96379d9
commit d4542aa2af

View File

@ -31,3 +31,10 @@ register-state-path /var/log/mysql
if [ "$DIB_INIT_SYSTEM" == "systemd" ]; then
systemctl enable mysqld.service
fi
DISTRO=`lsb_release -si` || true
if [[ "RedHatEnterpriseServer CentOS Fedora" =~ "$DISTRO" ]]; then
# mysql clients on redhat expect the socket at /var/lib/mysql/mysql.sock
mkdir -p /var/lib/mysql
ln -s /var/run/mysqld/mysqld.sock /var/lib/mysql/mysql.sock
fi