Symptoms
-
Plesk login page is unavailable:
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)
-
MySQL/MariaDB fails to start. While attempting to start MySQL/MariaDB similar to the below error appears in the
/var/log/mysqld.log
or in/var/log/mariadb/mariadb.log
with reference to different variable:[ERROR] /usr/libexec/mysqld: unknown variable 'set-variable=local-infile=0'[ERROR] Aborting
Cause
-
File
/etc/my.cnf
contains unsupported variables. -
Misspelling in a variable name.
Resolution
-
Connect to the server via SSH.
-
Check that the variable name is set correctly in
/etc/my.cnf
. -
If the issue persists, comment on the line with the variable name in
/etc/my.cnf
file under [mysqld] section. -
Start MySQL service or restart if it is already running:
# service mysqld restart
or
# service mariadb restart