• 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

Resolved MySQL/MariaDB does not service all requests due to mismatch of socket definitions

Quinten

Regular Pleskian
Server operating system version
Ubuntu 18
Plesk version and microupdate number
Plesk Obsidian Version 18.0.49 Update #2
Hello,

Ive stumbled on a problem that is quite urgent.
I was working on grafana when plesk on my server went down (plesk panel unreachable due to database error). The last change i made was 2 days before that and all i did was change the bind adress in my.cnf to ::
After some troubleshooting i got the plesk panel working and the DB error was gone after i changed the socket in the /etc/mysql/mariadb.conf.d/50-server.cnf from

socket = /var/run/mysqld/mysqld.sock
to
socket = /var/lib/mysql/mysql.sock

The problem with this is that the plesk panel is reachable but i cannot access any phpmyadmin application and some websites (not all) go down with some DB related connection error.
How can i fix this? and what are the correct locations for the PID file and socket file? also for the my.cnf file

Or would it be better to delete and reinstall mysql / mysql server? if so how do i do that while being careful with plesk installation and databases.

-mysql error log looks fine
-tried plesk repair
-tried mysql repair
-tried changing bind adress again
-tried taking over 50-server 50-client and my.cnf files form my other servers to see but nothing seems to work

Any help would be very much appriciated because at the moment my plesk is not reachable and i get the error:
I have searched many articles and tried many solutions on them and after working on this for 5 hrs yesterday i now come here to look for some help.

Kind Regards,
Quinten

1675067338452.png
 
This is not caused by the bind address. It is very likely also not caused by Plesk but an issue of the database server itself or the operating system. I do not recommend trying do-it-yourself fixing attempts on this unless you have full backups of everything and a lot of time. Instead, please let Plesk support staff check this, please.

If you do not wish to take that route, consider to spin-up a new server and migrate your content to it, e.g. through Plesk Migrator (as you say that Plesk is running on the changed socket) or by a restore from a backup.
 
I contacted plesk support and they where able to solve it for me.

Incase anyone has this problem aswell im sharing the solution i got from them
Hello,

The issue appeared to be related to the recently applied changes to the MySQL configuration files.

As soon as I specified one path to the socket - /var/run/mysqld/mysqld.sock - in all the files /etc/mysql/mariadb.conf.d/50-server.cnf, /etc/psa/psa.conf, and /usr/local/psa/admin/conf/php.ini, the issue was solved. Due to the previously existing mismatch, the connection was not established while accessing Plesk UI in a browser, however, it was possible to access the psa database directly from the command line.

Also during the investigation, the bind-address value was adjusted to 127.0.0.1 in the /etc/mysql/mariadb.conf.d/50-server.cnf file.

Kind Regards,
Quinten
 
Back
Top