• 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

Ubuntu 14.04 mysql error after restart

core2

New Pleskian
Hi

I have restarted the server and am getting the following error:

ERROR: PleskDBException: Unable to connect to database: mysql_connect(): No such file or directory /var/run/mysqld/mysqld.sock (Error code: 2002). Please check that database server is started and accessible. (Abstract.php:69)

Anyway to fix this?
 
@IgorG Thank you very much for the response....

so if we rename the file as suggested in the document and if we restart the server will it work without the error on next boot?
mv /etc/init/mysql.conf /etc/init/mysql.conf.off

for now we started the mysql by issuing the following commands

sudo service mysql stop
sudo service mysql start​

it worked but not sure whether it's the proper way to do it.
 
sudo service mysql stop
sudo service mysql start

Yes, it works fine after running the above commands but if we restart the server we have to run the above commands to make the mysql working. So if we rename mv /etc/init/mysql.conf /etc/init/mysql.conf.off will it solve the issue?
 
Back
Top