Articles in this section

Unable to access Plesk panel: ERROR: 500 Plesk\Exception\Database: SQLSTATE[HY000] [2002] Connection refused

Plesk for Linux kb: technical

Symptoms

  • Plesk panel is inaccessible with the error:

    PLESK_ERROR: 500 Plesk\Exception\Database
    DB query failed: "SET sql_mode = ''" Error: SQLSTATE[HY000] [2002] Connection refused

  • MariaDB service is down and fails to start.

  • The log /var/log/mariadb/mariadb.log contains the following:

    CONFIG_TEXT: [ERROR] mariadbd: Can't create/write to file '/run/mariadb/mariadb.pid' (Errcode: 2 "No such file or directory")
    [ERROR] Can't start server: can't create PID file: No such file or directory

Cause

The directory /var/run/mariadb does not exist.

Resolution

  1. Log into Plesk

  2. Create the missing directory:

    # mkdir /var/run/mariadb

  3. Set the correct permissions

    # chown -R mysql:mysql /var/run/mariadb/

  4. Start MariaDB

    # systemctl restart mariadb

Was this article helpful?

Comments

1 comment
Date Votes
  • After followed Resolution instructions, the problem still continues

    0

Please sign in to leave a comment.