|
| 1 | +# Breaking and incompatible changes in the MySQL 9.x series |
| 2 | + |
| 3 | +Review these items before upgrading from 8.x or an earlier 9.x release to 9.7 (or later 9.x). This document covers the most significant breaking behavioral changes, removed features, and removed variables that may affect your upgrade. Each entry includes the impact, replacement (if available), and recommended action. |
| 4 | + |
| 5 | +Content is drawn from the MySQL 9.0, 9.2, 9.3, 9.4, and 9.5 release notes and the MySQL Reference Manual “What Is New” (nutshell) sections. For Percona Server for MySQL, check Percona release notes; timing and implementation may differ from community MySQL. |
| 6 | + |
| 7 | +Review the [MySQL 9.x Reference Manual :octicons-link-external-16:](https://dev.mysql.com/doc/refman/9.6/en/) for more information. |
| 8 | + |
| 9 | +## Authentication and user management (9.0) |
| 10 | + |
| 11 | +Impact: |
| 12 | + |
| 13 | +* The `mysql_native_password` authentication plugin is removed in MySQL 9.0.0 (it was deprecated in 8.0). The server rejects `mysql_native` authentication from older clients that do not support `CLIENT_PLUGIN_AUTH`. |
| 14 | +* The server options `--mysql-native-password`, `--mysql-native-password-proxy-users`, and the `default_authentication_plugin` system variable are removed. |
| 15 | + |
| 16 | +Replacement: |
| 17 | + |
| 18 | +* Use `caching_sha2_password` or another supported authentication plugin. New users default to `caching_sha2_password` in 8.4 and later. |
| 19 | + |
| 20 | +Action: |
| 21 | + |
| 22 | +* Identify accounts and applications using `mysql_native_password` and migrate them to `caching_sha2_password` (or another supported plugin) before upgrading to 9.x. |
| 23 | +* Remove `--mysql-native-password`, `--mysql-native-password-proxy-users`, and `default_authentication_plugin` from configuration and scripts. |
| 24 | +* When upgrading from MySQL 5.7 to a later release, the system accounts `mysql.sys` and `mysql.session` are updated to use `caching_sha2_password` (as of 9.2). |
| 25 | + |
| 26 | +## Replication and mixed storage engines (9.0) |
| 27 | + |
| 28 | +Impact: |
| 29 | + |
| 30 | +* Transactions that update both transactional and nontransactional (or noncomposable) tables now produce a deprecation warning to the client and to the error log. Only InnoDB and BLACKHOLE are transactional and composable; NDB is transactional but not composable. |
| 31 | + |
| 32 | +Replacement: |
| 33 | + |
| 34 | +* Restrict such transactions or use only composable engine combinations (e.g. InnoDB+BLACKHOLE, MyISAM+MERGE) where the warning is not raised. |
| 35 | + |
| 36 | +Action: |
| 37 | + |
| 38 | +* Review workloads and replication streams for mixed-engine transactions; see [Replication and Transactions](https://dev.mysql.com/doc/refman/9.0/en/replication-features-transactions.html) in the MySQL manual. |
| 39 | +* Plan to eliminate or isolate mixed-engine usage before or after upgrading replicas. |
| 40 | + |
| 41 | +## FLUSH PRIVILEGES and related (9.2) |
| 42 | + |
| 43 | +Impact: |
| 44 | + |
| 45 | +* The `FLUSH PRIVILEGES` statement is deprecated and produces a warning when used; it is expected to be removed in a future release. |
| 46 | +* The `FLUSH_PRIVILEGES` privilege and its grant are deprecated, as are `mysqladmin flush-privileges` and `mysqladmin reload`. Flushing privileges via SIGHUP and `mysqladmin refresh` are also considered deprecated (no warning). |
| 47 | + |
| 48 | +Replacement: |
| 49 | + |
| 50 | +* Use the recommended privilege-load behavior; see the [FLUSH statement](https://dev.mysql.com/doc/refman/9.2/en/flush.html) and [mysqladmin](https://dev.mysql.com/doc/refman/9.2/en/mysqladmin.html) documentation. |
| 51 | + |
| 52 | +Action: |
| 53 | + |
| 54 | +* Update scripts, automation, and runbooks to remove or replace `FLUSH PRIVILEGES` and the deprecated mysqladmin commands before upgrading to 9.7. |
| 55 | + |
| 56 | +## Version Tokens plugin (9.2 deprecated, 9.3 removed) |
| 57 | + |
| 58 | +Impact: |
| 59 | + |
| 60 | +* The Version Tokens plugin was deprecated in 9.2 and removed in 9.3. The Version Tokens functions, `VERSION_TOKEN_ADMIN` privilege, and the `version_tokens_session` and `version_tokens_session_number` system variables are removed with the plugin. |
| 61 | + |
| 62 | +Replacement: |
| 63 | + |
| 64 | +* No direct replacement; implement equivalent logic in application or middleware if needed. |
| 65 | + |
| 66 | +Action: |
| 67 | + |
| 68 | +* Remove use of Version Tokens plugin, related functions, privilege, and variables from configuration and code before upgrading to 9.x. |
| 69 | + |
| 70 | +## Connection Control plugins (9.2) |
| 71 | + |
| 72 | +Impact: |
| 73 | + |
| 74 | +* Both Connection Control plugins are deprecated and subject to removal in a future release. The plugin system and status variables and the Information Schema table used by the plugins are deprecated. |
| 75 | + |
| 76 | +Replacement: |
| 77 | + |
| 78 | +* The Connection Control component (`component_connection_control`) replaces both plugins with a single `INSTALL COMPONENT`; the component uses its own variables and a Performance Schema table. See [Connection Control Component](https://dev.mysql.com/doc/refman/9.2/en/connection-control-component.html). |
| 79 | + |
| 80 | +Action: |
| 81 | + |
| 82 | +* Migrate from the Connection Control plugins to the Connection Control component before the plugins are removed; update configuration and any scripts that query the deprecated I_S table. |
| 83 | + |
| 84 | +## Replica parallel workers minimum (9.3) |
| 85 | + |
| 86 | +Impact: |
| 87 | + |
| 88 | +* As of 9.3, `replica_parallel_workers` can no longer be set to `0`; the minimum permitted value is `1`. |
| 89 | + |
| 90 | +Replacement: |
| 91 | + |
| 92 | +* Use `replica_parallel_workers = 1` if you previously relied on `0` for single-threaded applier behavior. |
| 93 | + |
| 94 | +Action: |
| 95 | + |
| 96 | +* Remove or change any configuration that sets `replica_parallel_workers = 0` before upgrading. |
| 97 | + |
| 98 | +## InnoDB and Version Tokens variables removed (9.3) |
| 99 | + |
| 100 | +Impact: |
| 101 | + |
| 102 | +* InnoDB: `innodb_log_file_size`, `innodb_log_files_in_group`, and `innodb_undo_tablespaces` are removed; redo/undo configuration is handled differently. |
| 103 | +* Version Tokens: `version_tokens_session` and `version_tokens_session_number` are removed with the plugin. |
| 104 | + |
| 105 | +Replacement: |
| 106 | + |
| 107 | +* See the MySQL Reference Manual for current redo/undo and log configuration options. |
| 108 | + |
| 109 | +Action: |
| 110 | + |
| 111 | +* Remove these variables from configuration; adopt the current InnoDB and logging configuration model before upgrading. |
| 112 | + |
| 113 | +## IGNORE and scalar subqueries (9.0) |
| 114 | + |
| 115 | +Impact: |
| 116 | + |
| 117 | +* `ER_SUBQUERY_NO_1_ROW` is no longer ignored by statements that use the `IGNORE` keyword. An UPDATE, DELETE, or INSERT that includes `IGNORE` and a scalar subquery returning more than one row can raise an error after upgrading to 9.0. |
| 118 | + |
| 119 | +Replacement: |
| 120 | + |
| 121 | +* Ensure scalar subqueries return at most one row, or avoid relying on `IGNORE` to suppress this error. |
| 122 | + |
| 123 | +Action: |
| 124 | + |
| 125 | +* Audit procedures, scripts, and application SQL for `IGNORE` with scalar subqueries; fix logic or remove `IGNORE` where appropriate. |
| 126 | + |
| 127 | +## Inline foreign keys enforced (9.0) |
| 128 | + |
| 129 | +Impact: |
| 130 | + |
| 131 | +* Inline foreign key specifications and implicit references to parent primary keys are now enforced; previously some forms were parsed but ignored. |
| 132 | + |
| 133 | +Replacement: |
| 134 | + |
| 135 | +* Use the standard syntax that MySQL now enforces. |
| 136 | + |
| 137 | +Action: |
| 138 | + |
| 139 | +* Confirm schema definitions and any generated DDL match the intended constraints; fix any statements that relied on previously ignored syntax. |
| 140 | + |
| 141 | +## Group Replication and replica variables removed (9.5) |
| 142 | + |
| 143 | +Impact: |
| 144 | + |
| 145 | +* `group_replication_allow_local_lower_version_join` is removed. |
| 146 | +* `replica_parallel_type` and `slave_parallel_type` are removed; replica parallelization is controlled differently. |
| 147 | +* All semisynchronous replication system and status variables (`rpl_semi_sync_master_*`, `rpl_semi_sync_slave_*`, `Rpl_semi_sync_master_*`, `Rpl_semi_sync_slave_*`) are removed in MySQL 9.5. |
| 148 | + |
| 149 | +Replacement: |
| 150 | + |
| 151 | +* Use current Group Replication and replication configuration options; externalize semisync behavior if required. |
| 152 | + |
| 153 | +Action: |
| 154 | + |
| 155 | +* Remove removed variables from configuration and monitoring; update automation and runbooks to use current replication and Group Replication options. |
| 156 | + |
| 157 | +## MySQL 9.0.0 availability |
| 158 | + |
| 159 | +Impact: |
| 160 | + |
| 161 | +* MySQL 9.0.0 was withdrawn from download due to a critical bug: after creating a very large number of tables (8001 or more), the server could fail to restart. |
| 162 | + |
| 163 | +Replacement: |
| 164 | + |
| 165 | +* Use MySQL 9.0.1 or later for the 9.0 series. |
| 166 | + |
| 167 | +Action: |
| 168 | + |
| 169 | +* If you are on or evaluating 9.0, use 9.0.1 or later; see [Changes in MySQL 9.0.1](https://dev.mysql.com/doc/relnotes/mysql/9.0/en/news-9-0-1.html). |
| 170 | + |
| 171 | +## Further reading |
| 172 | + |
| 173 | +* [Compatibility and removed items in the MySQL 9.x series](./9x-compatibility-and-removed-items.md) |
| 174 | +* [Defaults and tuning guidance for the MySQL 9.x series](./9x-defaults-and-tuning.md) |
| 175 | +* [What's New in the MySQL 9.x series (APT/DNF/YUM)](./whats-new-mysql-9x-apt-dnf-yum.md) |
| 176 | +* [Upgrade overview](./upgrade.md) |
| 177 | +* [Upgrade strategies](./upgrade-strategies.md) |
| 178 | +* [MySQL upgrade paths and supported methods](./mysql-upgrade-paths.md) |
| 179 | +* [Upgrade from plugins to components](./upgrade-components.md) |
| 180 | +* [Downgrade options](./downgrade.md) |
0 commit comments