• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

MySQL upgrade caused PSA to crash

W

w3it

Guest
Hi
I have just upgraded using yum mysql version 3.23.58-9.1 to version 12.22 Distrib 4.0.24, for redhat-linux-gnu (i686)

When I refreshed PSA I got the following error:

Unable to connect to database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) 0: /usr/local/psa/admin/auto_prepend/auth.php3:66 psaerror(string "Unable to connect to database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)")

Help greatly appreciated on this one!
Ian
 
make sure you are pointing at the right mysql.sock file. You can specify where the sock file is, in a file named "/etc/my.cnf"

Do a search on the system and find the previous mysql.sock.

Then specify the location in your my.cnf file. (example versions are included in the plesk/mysql folder; they are named "my-small.cnf, my-medium.cnf, and my-large.cnf"... just copy one of them to /etc/my.cnf and set the sock directive to point to the proper place.

Hope that helps,

-J
 
Hi
this is the current my.cnf. Has the Plesk one been overwritten by yum upgrading? How do I find where yum has placed the upgrades? Could it be the user and password fields?

[mysqld]
innodb_data_file_path=ibdata1:10M:autoextend
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
skip-networking

[mysql.server]
user=mysql
basedir=/var/lib

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
 
Have you tried to restart mysqld?

For me, MySQL always stops working (but is running) after upgrade to a newer version.
A simple restart of mysqld does the trick (at least for me).
 
Hi and thanks

Thats what it was! Once I restarted, it worked fine. Bit poor that no prompt was given that I should restart mysql. Still at least I know for next time.
 
And for anyone reading this thread looking for help in the future, I find that ALWAYS after an mysql upgrade I have to reboot the server. restarting mysql just doesn't work for me.

Faris.
 
Back
Top