mysql doesn't connect to socket
when we configured our sites to connect to 'localhost' we get:
Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
# perror 2
OS error code 2: No such file or directory
root@host [~]# ls -la /var/lib/mysql/mysql.sock
srwxrwxrwx 1 mysql mysql 0 Nov 24 10:50 /var/lib/mysql/mysql.sock=
root@host [~]# ls -lad /
dr-xr-xr-x. 23 root root 4096 Nov 7 02:27 //
root@host [~]# ls -lad /var
drwxr-xr-x. 26 root root 4096 Nov 20 02:11 /var/
root@host [~]# ls -lad /var/lib
drwxr-xr-x. 25 root root 4096 Nov 5 12:11 /var/lib/
root@host [~]# ls -lad /var/lib/mysql
drwxr-x--x 36 mysql mysql 4096 Nov 24 10:50 /var/lib/mysql/
how do we fix it?
Thanks.
-
[SOLVED] This was a problem with cloudlinux's cagefs adding /var/lib/mysql to /etc/cagefs/cagefs.mp and running cagefsctl --remount-all fixed the problem 0
Please sign in to leave a comment.
Comments
1 comment