Applicable to:
- Plesk for Linux
Symptoms
- The following error can be found in /var/log/mysql.log on Plesk server:
CONFIG_TEXT: [ERROR] Incorrect definition of table mysql.event: expected column 'sql_mode' at position 14 to have type set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH'), found type set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_A
- MySQL was replaced with MariaDB some time ago or MySQL/MariaDB was upgraded to a higher version.
Cause
During the upgrade of MySQL/MariaDB, mysql_upgrade
command was not executed or was executed with errors.
Resolution
- Connect to the server via SSH.
- Create a backup of
/var/lib/mysql/
# cp -a /var/lib/mysql/ /var/lib/mysql_backup/
- Start
mysql_upgrade
with admin user credentials:# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin
- Restart MySQL service:
# service mysql restart
- In case the error will be the same, fix
event
table manually.Click here to reveal the manual fix procedure- Enter the database as admin user:
# plesk db
- Change the database to
mysql
:MYSQL_LIN: mysql> use mysql;
- Alter the table with the following query:
MYSQL_LIN: mysql> ALTER TABLE `event` CHANGE `sql_mode` `sql_mode` SET( 'REAL_AS_FLOAT', 'PIPES_AS_CONCAT', 'ANSI_QUOTES', 'IGNORE_SPACE', 'IGNORE_BAD_TABLE_OPTIONS', 'ONLY_FULL_GROUP_BY', 'NO_UNSIGNED_SUBTRACTION', 'NO_DIR_IN_CREATE', 'POSTGRESQL', 'ORACLE', 'MSSQL', 'DB2', 'MAXDB', 'NO_KEY_OPTIONS', 'NO_TABLE_OPTIONS', 'NO_FIELD_OPTIONS', 'MYSQL323', 'MYSQL40', 'ANSI', 'NO_AUTO_VALUE_ON_ZERO', 'NO_BACKSLASH_ESCAPES', 'STRICT_TRANS_TABLES', 'STRICT_ALL_TABLES', 'NO_ZERO_IN_DATE', 'NO_ZERO_DATE', 'INVALID_DATES', 'ERROR_FOR_DIVISION_BY_ZERO', 'TRADITIONAL', 'NO_AUTO_CREATE_USER', 'HIGH_NOT_PRECEDENCE', 'NO_ENGINE_SUBSTITUTION', 'PAD_CHAR_TO_FULL_LENGTH' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '';
- Restart MySQL once again:
# service mysql restart
- Enter the database as admin user:
Comments
0 comments
Please sign in to leave a comment.