MySQL fails to start: unknown variable

Refers to:

  • Plesk 12.5 for Linux
  • Plesk 10.0.1 for Linux
  • Plesk 11.5 for Linux
  • Plesk 12.0 for Linux

Created:

2016-11-16 12:41:24 UTC

Modified:

2016-12-21 18:58:53 UTC

0

Was this article helpful?


Have more questions?

Submit a request

MySQL fails to start: unknown variable

Symptoms

  • MySQL fails to start. While attempt to start MySQL the following error appears in the /var/log/mysqld.log or in /var/log/mariadb/mariadb.log :

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

    or the following one:

    [ERROR] /usr/libexec/mysqld: unknown variable 'max_allwed_packet=128M'
    [ERROR] Aborting
  • Cannot login into Plesk:

    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)

Cause

  1. File /etc/my.cnf contains unsupported variable set-variable=local-infile=0 .

  2. Misspelling in variable name.

Resolution

  1. Check that variable name is set correctly.

  2. Comment line set-variable=local-infile=0 in /etc/my.cnf file under [mysqld] section.

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

    # /etc/init.d/mysql start
    # service mysqld restart
Have more questions? Submit a request
Please sign in to leave a comment.