Symptoms
- Plesk inaccessible with the following error:
PLESK_ERROR: Zend_Db_Adapter_Exception: SQLSTATE[HY000] [2002] No such file or directory
- The following error is shown in the
/var/log/plesk/panel.log
:[2018-03-24 22:29:12] ERR [panel] SQLSTATE[HY000] [2002] No such file or directory:
0: /opt/psa/admin/externals/Zend/Db/Adapter/Pdo/Abstract.php:144
Zend_Db_Adapter_Pdo_Abstract->_connect()
1: /opt/psa/admin/externals/Zend/Db/Adapter/Pdo/Mysql.php:111
Zend_Db_Adapter_Pdo_Mysql->_connect()
2: /opt/psa/admin/externals/Zend/Db/Adapter/Abstract.php:460
...... - MySQL service cannot be started:
# systemctl start mysql
Job for mysql.service failed because the control process exited with error code. See “systemctl status mysql.service” and “journalctl -xe” for details. - The following error for MySQL in journalctl:
# journalctl -u mysql
Mar 24 22:03:00 example.com mysqld[3250]: 2018-03-24T21:03:00.476609Z 0 [ERROR] You have enabled the binary log, but you haven’t provided the mandatory server-id. Please refer to the proper ser
Mar 24 22:03:00 example.com mysqld[3250]: 2018-03-24T21:03:00.477503Z 0 [ERROR] Aborting
Cause
MySQL misconfiguration.Â
Resolution
- Connect to the server via SSH.
- Comment out the following lines in /etc/my.cnf:
#log_bin = /var/log/mysql/mariadb-bin
#log_bin_index = /var/log/mysql/mariadb-bin.inde
#log_slow_verbosity = query_plan - Start MySQL:Â
# systemctl restart mysql
Additional information
Plesk shows ERROR: Zend_Db_Adapter_Exception: SQLSTATE[HY000] [2002] No such file or directory