• 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

Server down after moving to other location

D

DaeyeulJ

Guest
Hi!

I have a server with 1and1 and they relocate the server to a new location early this morning (from New Jersey to Kansas). They are not moving the server physically but mirror the data from the old server to the new one instead.

They restored the data but I kept getting the following error message:

ERROR: PleskFatalException
Unable to connect to database: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

0: /usr/local/psa/admin/plib/common_func.php3:190
psaerror(string 'Unable to connect to database: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)')
1: /usr/local/psa/admin/auto_prepend/auth.php3:93

They (1and1) have been looking into this situation since this morning but there has been no solution. This afternoon, they requested Plesk Parallels team to look at this issue. However I haven't heard back from them yet.

I have client accounts that are hosted at the server and it is critical for them to be able to have access to their emails and have the websites up and running.

Do you have any suggestions or could provide any help? I would really appreciate it.

Thank you!
 
Hi,

Error code '2' translates as 'No such file or directory':
# perror 2
OS error code 2: No such file or directory

Check the following:
1. Is mysql server running at all?
/etc/init.d/mysqld status

If it is not - start it. If it fails to start check script output and mysql log file (usually written to /var/log/mysqld.log) to see why it fails.

2. Can you connect to psa database:
mysql -uadmin -p`cat /etc/psa//.psa.shadow` psa

If you cannot try restarting mysql and check mysql log for more details.

3. If you can connect to mysql but Plesk still fails then make sure /var/lib/mysql/mysql.sock exists in this location. For example:
# ls -l /var/lib/mysql/mysql.sock
srwxrwxrwx 1 mysql mysql 0 Oct 3 11:24 /var/lib/mysql/mysql.sock

If it is missing then check Mysql configuration file to see where it places its .sock file:
# grep socket /etc/my.cnf
socket=/var/lib/mysql/mysql.sock

If it places it not to /var/lib/mysql/mysql.sock but somewhere else, then change it to /var/lib/mysql/mysql.sock and restart MySql.

If it still does not help then check Parallels Plesk log - /usr/local/psa/admin/logs/httpsd_error_log, system log - /var/log/messages and mysql log - /var/log/mysqld.log
 
Back
Top