Articles in this section

Unable to start MySQL/MariaDB on a Plesk for Linux server: unknown variable

Plesk for Linux kb: technical ABT: Group B

Applicable to:

  • Plesk for Linux

Symptoms

  • Plesk login page is unavailable:

    CONFIG_TEXT: 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:

    CONFIG_TEXT: [ERROR] /usr/libexec/mysqld: unknown variable 'set-variable=local-infile=0'[ERROR] Aborting

Cause

  1. File /etc/my.cnf contains unsupported variables.

  2. Misspelling in a variable name.

Resolution

  1. Connect to the server via SSH.

  2. Check that the variable name is set correctly in /etc/my.cnf.

  3. If the issue persists, comment on the line with the variable name in /etc/my.cnf file under [mysqld] section.

  4. Start MySQL service or restart if it is already running:

    # service mysqld restart

    or

    # service mariadb restart

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.