Print View

ServerVersionUpgradeConditionCheckFailed Upgrading from Azure MySQL 5.7 to 8.0

Issue

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"
}

Resolution

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.

References

Major version upgrade in Azure Database for MySQL - Flexible Server
https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-upgrade

Known Issues With Migrations To Azure Database for MySQL
https://learn.microsoft.com/en-us/azure/dms/known-issues-azure-mysql-fs-online#incompatible-sql-mode

Products

Microsoft Azure Database for MySQL flexible server 8.0
Microsoft Azure Database for MySQL flexible server 5.7

Created: 9th October 2023
Updated: 9th October 2023

Print View

© 2005-2024 Jamie Morrison