Hello,
The MySQL and MariaDB server configuration is updated to make sure the UNIX socket for accepting client connections will be created in /run/mysql/mysql.sock. Before this change, the default socket location used to be /var/lib/mysql/mysql.sock.
Users with
CloudLinux are highly advised to run the update to
DirectAdmin 1.693 controlling how MySQL connection works in cagefs after all. Or keep MySQL socket in
/var/lib/mysql/
Found this change breaking CloudLinux servers with MySQL/MariaDB installed by DirectAdmin. The socket
/run/mysql/mysql.sock is not available in CloudLinux, and it might break sites:
Steps to test
after upgrading to DirectAdmin 1.693 and performing an upgrade of MySQL/MariaDB:
1. Make sure you have DirectAdmin and MySQL/MariaDB updated, run as root:
Bash:
ls -la /run/mysql/mysql.sock
You should see something like:
Bash:
# ls -la /run/mysql/mysql.sock
srwxrwxrwx 1 mysql mysql 0 Jan 20 09:10 /run/mysql/mysql.sock
Stop here, if the output errors.
2. Connect as any user in CageFS:
Bash:
su - testuser1 -s /bin/bash
3. Run:
Bash:
ls -la /var/lib/mysql/mysql.sock
ls -la /run/mysql/mysql.sock
If you see the error:
Bash:
ls: cannot access '/run/mysql/mysql.sock': No such file or directory
then you need to run the patch offered in the bottom of the post.
example:
Bash:
[testuser1@dev ~]$ ls -la /var/lib/mysql/mysql.sock
lrwxrwxrwx 1 root root 21 Jan 19 17:05 /var/lib/mysql/mysql.sock -> /run/mysql/mysql.sock
[testuser1@dev ~]$ ls -la /run/mysql/mysql.sock
ls: cannot access '/run/mysql/mysql.sock': No such file or directory
[testuser1@dev ~]$
A fix:
The following fix was suggested by
Roman from DA team.
Bash:
echo "/run/mysql" >> /etc/cagefs/cagefs.mp
cagefsctl --remount-all
so you can update it to the following view:
Bash:
grep -m1 '^/run/mysql' /etc/cagefs/cagefs.mp || echo "/run/mysql" >> /etc/cagefs/cagefs.mp
cagefsctl --remount-all