Unable to log in to Plesk: Unable to connect to database: mysql_connect(): No such file or directory /var/lib/mysql/mysql.sock (Error code: 2002)

Created:

2016-11-16 13:16:13 UTC

Modified:

2017-06-05 05:43:04 UTC

0

Was this article helpful?


Have more questions?

リクエストを送信

Unable to log in to Plesk: Unable to connect to database: mysql_connect(): No such file or directory /var/lib/mysql/mysql.sock (Error code: 2002)

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 12.0 for Linux
  • Plesk 11.0 for Linux

Symptoms

  • Unable to log in to Plesk, the following error appears in Plesk interface:

    ERROR: PleskDBException: Unable to connect to database: mysql_connect(): No such file or directory /var/lib/mysql/mysql.sock (Error code: 2002). Please check that database server is started and accessible. (Abstract.php:69)
    
  • When trying to run plesk repair db -v in CLI the output is as follows:

    Broken table exp_event: 107 clients are using or haven't closed the
    table properly .................................................... [WARNING]
    
  • When trying to backup psa database:

    # mysqldump -uadmin -p`cat /etc/psa/.psa.shadow`  --skip-extended-insert  psa > psa.dump.`date +%F.%s`.sql
    mysqldump: Error 2013: Lost connection to MySQL server during query when dumping table `table_name` at row: xxxx
    
  • When trying to check a faulty table from previous step:

    # mysqlcheck -c psa table_name -uadmin -p`cat /etc/psa/.psa.shadow`
    mysqlcheck: Got error: 2013: Lost connection to MySQL server during query when executing 'CHECK TABLE ... '
    

Cause

Database corruption. At least one table in psa database is damaged.

Resolution

Consider restoring the database from a recent backup.

他にご質問がございましたら、リクエストを送信してください
ログインしてコメントを残してください。