[Case 105565] recreate /tmp/mysql.sock on mysql restart
Hello everybody,
With the latest update (Cpanel version: 11.44.0 (build 17)) one of my server's began having problem - system could not connect to the mysql.
Also MODSEC:
After investigating with the help of Cpanel, we found that [QUOTE]MySQL no longer automatically re-creates symlink if it's not present.
And openened inquiry (#105565). Quick solution would be add to you /etc/my.cnf: [QUOTE][client] socket=/var/lib/mysql/mysql.sock
Or create symlink. Mods, please update this thread. Thanks.
Cron /usr/bin/test -x /usr/local/cpanel/scripts/update_db_cache && /usr/local/cpanel/scripts/update_db_cache
Error while connecting to MySQL: Cpanel::DBI::Mysql connect('','root',...) failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) at /usr/local/cpanel/Cpanel/Mysql.pm line 140Also MODSEC:
/etc/cron.hourly/modsecparse.pl:
DBI connect('modsec:localhost','modsec',...) failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) at /etc/cron.hourly/modsecparse.pl line 20
Unable to connect to mysql database at /etc/cron.hourly/modsecparse.pl line 20.After investigating with the help of Cpanel, we found that [QUOTE]MySQL no longer automatically re-creates symlink if it's not present.
And openened inquiry (#105565). Quick solution would be add to you /etc/my.cnf: [QUOTE][client] socket=/var/lib/mysql/mysql.sock
Or create symlink. Mods, please update this thread. Thanks.
-
Hello :) Internal case number 105565 is open to inquire if /tmp/mysql.sock should be recreated after MySQL restarts. I will update this thread with more information as it becomes available. In the meantime, manually creating the symbolic link is a valid workaround if it does not exist: ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
Thank you.0 -
[quote="cPanelMichael, post: 1673292">Hello :) Internal case number 105565 is open to inquire if /tmp/mysql.sock should be recreated after MySQL restarts. I will update this thread with more information as it becomes available. In the meantime, manually creating the symbolic link is a valid workaround if it does not exist: ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
Thank you.
I believe I have the same type of problem: Error while connecting to MySQL: Cpanel::DBI::Mysql connect('','root',...) failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) at /usr/local/cpanel/Cpanel/Mysql.pm line 140 Error while connecting to MySQL: Cpanel::DBI::Mysql connect('','root',...) failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) at /usr/local/cpanel/Cpanel/Mysql.pm line 140 ...caught Could someone let me know if this can be fixed? I won't be able to fix this myself as I'm not technical, but it looks like an automatic update created this error, will cPanel bring out another update to fix this error?0 -
Did you try running the command referenced in my previous post? Thank you. 0
Please sign in to leave a comment.
Comments
3 comments