When attempting to upgrade from MySQL 5.7 to 8.0 in Azure, the following error is generated:
{
"code": "ServerVersionUpgradeConditionCheckFailed",
"message": "Upgrade server version failed, check the error message for details: Find invalid server parameters, please correct before upgrade to new server version
Name: sql_mode,
Current value: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,
Allowed values: ,ALLOW_INVALID_DATES,ANSI_QUOTES,ERROR_FOR_DIVISION_BY_ZERO,HIGH_NOT_PRECEDENCE,IGNORE_SPACE,NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,NO_DIR_IN_CREATE,NO_ENGINE_SUBSTITUTION,NO_UNSIGNED_SUBTRACTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ONLY_FULL_GROUP_BY,PAD_CHAR_TO_FULL_LENGTH,PIPES_AS_CONCAT,REAL_AS_FLOAT,STRICT_ALL_TABLES,STRICT_TRANS_TABLES,TIME_TRUNCATE_FRACTIONAL,
Issueed values: NO_AUTO_CREATE_USER"
}
Remove the issued values.
From the Azure Portal:
- Select the MySQL database
- Select
Server parameters
- Select the
sql_mode dropdown
- Uncheck
NO_AUTO_CREATE_USER
- Click
Save
Change MySQL to Standard instance as Burstable cannot be upgraded:
https://learn.microsoft.com/en-au/azure/mysql/flexible-server/how-to-upgrade
This can be downgraded to Burstable after a successful upgrade.