Plesk

Plesk inaccessible: ERROR: Zend_Db_Adapter_Exception: SQLSTATE[HY000] [2002] Connection refused

Symptoms

Cause

MySQL directory is absent so the system cannot create PID file for the service on startup.

Resolution

Note: This article may require additional administrative knowledge to apply. If any help required, contact server’s administrator or hosting support.

  1. Connect to the server via SSH.

  2. Create the configuration file with necessary content:

    • For Debian/Ubuntu:

      # echo "d /var/run/mysqld 0755 mysql mysql -" >> /etc/tmpfiles.d/mysql.conf

    • For CentOS/RHEL/CloudLinux:

      # echo "d /var/run/mariadb 0755 mysql mysql -" >> /etc/tmpfiles.d/mysql.conf

  3. Reboot the server.

Click on a section to expand

Solution without reboot for CentOS/RHEL/CloudLinux

  1. Connect to the server via SSH.

  2. Run the commands below:

    # install -dpm770 -o mysql -g mysql /var/run/mariadb

    # systemctl start mariadb

Exit mobile version