Symptoms
- The following is shown in
/var/log/plesk/install/plesk_18.0.*_installation.log
:
/usr/bin/mysql: unknown variable 'sql_mode=ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
- Attempt to query MySQL version fails the same errors:
# mysql -V
/usr/bin/mysql: unknown variable ‘sql_mode=ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION’
Cause
Deprecated MySQL variables are specified in /etc/my.cnf
:
ERROR_FOR_DIVISION_BY_ZERO
is set by default since MySQL 10.2.4NO_AUTO_CREATE_USER
is also deprecated
Resolution
1. Connect to the Plesk server via SSH.
2. Remove deprecated variables from the config file: /etc/my.cnf
. For Ubuntu/Debian only: remove it from all files within /etc/mysql
directory.
3. Restart MySQL service:
# systemctl restart mariadb || systemctl restart mysqld