MySQL Flexible Server 5.7 → 8.0 upgrade fails (VersionUpgradeFailed) — blocked by built-in mysql.az_replication_* procedures

Claudia Visca 0 Reputation points
2026-06-22T13:59:02.25+00:00

The in-place major version upgrade (5.7 → 8.0) of my Azure Database for MySQL Flexible Server fails with:

VersionUpgradeFailed — An error occurred while upgrading your Azure MySQL Flexible server
from 5.7 to 8.0, please use Oracle official MySQL upgrade checker to check whether your
server is ready for upgrade.

I ran util.checkForServerUpgrade() (MySQL Shell). The only Error-level findings are 4 stored procedures in the mysql system schema:

mysql.az_replication_change_master
mysql.az_replication_change_master_with_gtid
mysql.az_replication_remove_master
mysql.az_update_replica_information

All four fail the 8.0 syntax check with unexpected token 'REPLICATION'. Their definitions contain FLUSH REPLICATION;, which is invalid in MySQL 8.0.

Key points:

  • These are Azure-managed objects (DEFINER=azure_superuser@localhost), so I cannot modify them — any DDL on the mysql schema returns ERROR 1044: Access denied ... to database 'mysql'.
  • Replication is not even configured (SHOW SLAVE STATUS is empty).
  • They've existed unchanged since provisioning (CREATED = LAST_ALTERED = 2024-09-05).
  • Every other checker finding is Warning/Notice only (utf8mb3, etc.) — not the blocker.

Question: Has anyone hit this 5.7→8.0 upgrade block caused by the built-in az_replication_* procedures? Is there a supported way to get these system procedures fixed/recreated, or is a support ticket the only path? Target version chosen by the platform is 8.0.

Thanks!

Azure Database for MySQL
0 comments No comments

2 answers

Sort by: Oldest
  1. Jose Benjamin Solis Nolasco 12,036 Reputation points Volunteer Moderator
    2026-06-22T15:43:14.15+00:00

    Welcome to Microsoft Q&A

    Hello @Claudia Visca hope you are doing well,

    What is actually happening is that the warnings regarding the mysql.a``z_replication_* procedures from the upgrade checker can be safely ignored because they are built-in Azure features and do not affect functionality or block the upgrade. The actual VersionUpgradeFailed error is typically caused by deprecated server parameters, such as sql_mode containing NO_AUTO_CREATE_USER, which are no longer supported in MySQL 8.0 and will silently block the deployment.

    Check please the following things:

    Update sql_mode: Go to the Server parameters pane in the Azure portal and remove obsolete values from sql_mode (such as NO_AUTO_CREATE_USER, NO_FIELD_OPTIONS, NO_KEY_OPTIONS, and NO_TABLE_OPTIONS) to avoid deployment failure.

    Avoid simultaneous changes: Do not modify other properties of the service in the same request as the major version upgrade.

    Retry the upgrade: After making the necessary configuration changes on the server, try the upgrade again.

    References

    Major Version Upgrade - Azure Database for MySQL | Microsoft Learn

    If my answer helped you resolve your issue, please consider marking it as the correct answer. This helps others in the community find solutions more easily. Thanks!

    Was this answer helpful?


  2. SAI JAGADEESH KUDIPUDI 3,645 Reputation points Microsoft External Staff Moderator
    2026-06-23T00:50:46.57+00:00

    Hi @Claudia Visca ,

    Thank you for the detailed information.

    The az_replication_* procedures are not the blocker. Those four mysql.-prefixed objects are built-in, Azure-managed stored procedures. The unexpected token 'REPLICATION' errors from Oracle's checker are expected false positives and can be safely ignored — they don't affect functionality, which is also why you correctly cannot modify them (ERROR 1044 is by design).

    The real cause of VersionUpgradeFailed is usually a deprecated sql_mode value. Please do the following:

    1. Go to Server parameters in the Azure portal and remove these values from sql_mode if present: NO_AUTO_CREATE_USER, NO_FIELD_OPTIONS, NO_KEY_OPTIONS, NO_TABLE_OPTIONS (removed in MySQL 8.0).
    2. Take an on-demand backup (the upgrade is irreversible).
    3. Check for pending XA transactions — run XA RECOVER; and roll back any with XA ROLLBACK '{xid}';.
    4. Retry from Overview → Upgrade, confirm target version 8.0, and select Upgrade.

    If it still fails after clearing the deprecated sql_mode values, a support ticket is the right next step so the backend upgrade logs can be reviewed.

    Reference links:

    Hope this helps. If you have any follow-up questions, please let me know. I would be happy to help.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.