You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/mysql/flexible-server/how-to-upgrade.md
+52-41Lines changed: 52 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,29 +18,31 @@ ms.date: 10/12/2022
18
18
>[!Note]
19
19
> This article contains references to the term slave, a term that Microsoft no longer uses. When the term is removed from the software, we will remove it from this article.
20
20
21
-
This article describes how you can upgrade your MySQL major version in-place in Azure Database for MySQL Flexible server.
22
-
This feature will enable customers to perform in-place upgrades of their MySQL 5.7 servers to MySQL 8.0 with a select of button without any data movement or the need of any application connection string changes.
21
+
This article describes how you can upgrade your MySQL major version in-place in Azure Database for MySQL - Flexible server.
22
+
This feature enables customers to perform in-place upgrades of their MySQL 5.7 servers to MySQL 8.0 without any data movement or the need to make any application connection string changes.
23
23
24
24
>[!Important]
25
-
> - Major version upgrade for Azure database for MySQL Flexible Server is available in public preview.
26
-
> - Major version upgrade is currently not available for Burstable SKU 5.7 servers.
27
-
> - Duration of downtime will vary based on the size of your database instance and the number of tables on the database.
28
-
> - Upgrading major MySQL version is irreversible. Your deployment might fail if validation identifies the server is configured with any features that are [removed](https://dev.mysql.com/doc/refman/8.0/en/mysql-nutshell.html#mysql-nutshell-removals) or [deprecated](https://dev.mysql.com/doc/refman/8.0/en/mysql-nutshell.html#mysql-nutshell-deprecations). You can make necessary configuration changes on the server and try upgrade again
25
+
> - Major version upgrade for Azure Database for MySQL - Flexible Server is available in public preview.
26
+
> - Major version upgrade is currently unavailable for version 5.7 servers based on the Burstable SKU.
27
+
> - Duration of downtime varies based on the size of the database instance and the number of tables it contains.
28
+
> - Upgrading the major MySQL version is irreversible. Your deployment might fail if validation identifies that the server is configured with any features that are [removed](https://dev.mysql.com/doc/refman/8.0/en/mysql-nutshell.html#mysql-nutshell-removals) or [deprecated](https://dev.mysql.com/doc/refman/8.0/en/mysql-nutshell.html#mysql-nutshell-deprecations). You can make necessary configuration changes on the server and try upgrade again.
29
29
30
30
## Prerequisites
31
31
32
32
- Read Replicas with MySQL version 5.7 should be upgraded before Primary Server for replication to be compatible between different MySQL versions, read more on [Replication Compatibility between MySQL versions](https://dev.mysql.com/doc/mysql-replication-excerpt/8.0/en/replication-compatibility.html).
33
33
- Before you upgrade your production servers, we strongly recommend you to test your application compatibility and verify your database compatibility with features [removed](https://dev.mysql.com/doc/refman/8.0/en/mysql-nutshell.html#mysql-nutshell-removals)/[deprecated](https://dev.mysql.com/doc/refman/8.0/en/mysql-nutshell.html#mysql-nutshell-deprecations) in the new MySQL version.
34
-
- Trigger [on-demand backup](./how-to-trigger-on-demand-backup.md)before you perform major version upgrade on your production server, which can be used to [rollback to version 5.7](./how-to-restore-server-portal.md) from the full on-demand backup taken.
34
+
- Trigger [on-demand backup](./how-to-trigger-on-demand-backup.md) before you perform major version upgrade on your production server, which can be used to [rollback to version 5.7](./how-to-restore-server-portal.md) from the full on-demand backup taken.
35
35
36
36
37
-
## Perform Planned Major version upgrade from MySQL 5.7 to MySQL 8.0 using Azure portal
37
+
## Perform a Planned major version upgrade from MySQL 5.7 to MySQL 8.0 using the Azure portal
38
38
39
-
1. In the [Azure portal](https://portal.azure.com/), select your existing Azure Database for MySQL 5.7 server.
39
+
To perform a major version upgrade of an Azure Database for MySQL 5.7 server using the Azure portal, perform the following steps.
40
+
41
+
1. In the [Azure portal](https://portal.azure.com/), select your existing Azure Database for MySQL 5.7 server.
40
42
>[!Important]
41
43
> We recommend performing upgrade first on restored copy of the server rather than upgrading production directly. See [how to perform point-in-time restore](./how-to-restore-server-portal.md).
42
44
43
-
2. From the overview page, select the Upgrade button in the toolbar
45
+
2. On the **Overview** page, in the toolbar, select **Upgrade**.
44
46
45
47
>[!Important]
46
48
> Before upgrading visit link for list of [features removed](https://dev.mysql.com/doc/refman/8.0/en/mysql-nutshell.html#mysql-nutshell-removals) in MySQL 8.0.
@@ -49,93 +51,102 @@ This feature will enable customers to perform in-place upgrades of their MySQL 5
49
51
50
52
:::image type="content" source="./media/how-to-upgrade/1-how-to-upgrade.png" alt-text="Screenshot showing Azure Database for MySQL Upgrade.":::
51
53
52
-
3.In the Upgrade sidebar, verify Major Upgrade version to upgrade i.e 8.0.
54
+
3.In the **Upgrade** sidebar, in the **MySQL version to upgrade** text box, verify the major MySQL version you want to upgrade to, i.e., 8.0.
4. For Primary Server, select on confirmation checkbox, to confirm that all your replica servers are upgraded before primary server. Once confirmed that all your replicas are upgraded, Upgrade button will be enabled. For your read-replicas and standalone servers, Upgrade button will be enabled by default.
Before you can upgrade your primary server, you first need to have upgraded any associated read replica servers. Until this is completed, **Upgrade** will be disabled.
59
59
60
-
5. Once Upgrade button is enabled, you can select on Upgrade button to proceed with deployment.
60
+
4. On the primary server, select the confirmation message to verify that all replica servers have been upgraded, and then select **Upgrade**.
## Perform Planned Major version upgrade from MySQL 5.7 to MySQL 8.0 using Azure CLI
64
+
On read replica and standalone servers, **Upgrade** is enabled by default.
65
+
66
+
## Perform a Planned major version upgrade from MySQL 5.7 to MySQL 8.0 using the Azure CLI
65
67
66
-
Follow these steps to perform major version upgrade for your Azure Database of MySQL 5.7 server using Azure CLI.
68
+
To perform a major version upgrade of an Azure Database for MySQL 5.7 server using the Azure CLI, perform the following steps.
67
69
68
-
1.Install [Azure CLI](/cli/azure/install-azure-cli) for Windows or use [Azure CLI](../../cloud-shell/overview.md) in Azure Cloud Shell to run the upgrade commands.
70
+
1.Install the [Azure CLI](/cli/azure/install-azure-cli) for Windows or use the[Azure CLI](../../cloud-shell/overview.md) in Azure Cloud Shell to run the upgrade commands.
69
71
70
72
This upgrade requires version 2.40.0 or later of the Azure CLI. If you're using Azure Cloud Shell, the latest version is already installed. Run az version to find the version and dependent libraries that are installed. To upgrade to the latest version, run az upgrade.
71
73
72
-
2.After you sign in, run the [az mysql server upgrade](/cli/azure/mysql/server#az-mysql-server-upgrade) command.
74
+
2.After you sign in, run the [az mysql server upgrade](/cli/azure/mysql/server#az-mysql-server-upgrade) command.
73
75
74
76
```azurecli
75
77
az mysql server upgrade --name testsvr --resource-group testgroup --subscription MySubscription --version 8.0
76
78
```
77
79
78
-
3. Under confirmation prompt, type “y” for confirming or “n” to stop the upgrade process and enter.
80
+
3. Under the confirmation prompt, type **y** to confirm or **n** to stop the upgrade process, and then press Enter.
81
+
82
+
## Perform a major version upgrade from MySQL 5.7 to MySQL 8.0 on a read replica server using the Azure portal
83
+
84
+
To perform a major version upgrade of an Azure Database for MySQL 5.7 server to MySQL 8.0 on a read replica using the Azure portal, perform the following steps.
79
85
80
-
## Perform major version upgrade from MySQL 5.7 to MySQL 8.0 on read replica using Azure portal
86
+
1. In the Azure portal, select your existing Azure Database for MySQL 5.7 read replica server.
81
87
82
-
1. In the Azure portal, select your existing Azure Database for MySQL 5.7 read replica server.
88
+
2. On the **Overview** page, in the toolbar, select **Upgrade**.
83
89
84
-
2. From the Overview page, select the Upgrade button in the toolbar.
85
90
>[!Important]
86
91
> Before upgrading visit link for list of [features removed](https://dev.mysql.com/doc/refman/8.0/en/mysql-nutshell.html#mysql-nutshell-removals) in MySQL 8.0.
87
92
>Verify deprecated [sql_mode](https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_sql_mode) values and remove/deselect them from your current Flexible Server 5.7 using Server Parameters Blade on your Azure Portal to avoid deployment failure.
88
93
89
-
3.In the Upgrade section, select Upgrade button to upgrade Azure database for MySQL 5.7 read replica server to 8.0 server.
94
+
3.In the **Upgrade** section, select **Upgrade**to upgrade an Azure Database for MySQL 5.7 read replica server to MySQL 8.0.
90
95
91
-
4. A notification will confirm that upgrade is successful.
96
+
A notification appears to confirm that upgrade is successful.
92
97
93
-
5. From the Overview page, confirm that your Azure database for MySQL read replica server version is 8.0.
98
+
4. On the **Overview** page, confirm that your Azure Database for MySQL read replica server is running version is 8.0.
94
99
95
-
6. Now go to your primary server and perform major version upgrade on it.
100
+
5. Now, go to your primary server and perform major version upgrade on it.
96
101
97
102
## Perform minimal downtime major version upgrade from MySQL 5.7 to MySQL 8.0 using read replicas
98
103
104
+
To perform a major version upgrade of an Azure Database for MySQL 5.7 server to MySQL 8.0 with minimal downtime using read replica servers, perform the following steps.
105
+
99
106
1. In the Azure portal, select your existing Azure Database for MySQL 5.7.
100
107
101
108
2. Create a [read replica](./how-to-read-replicas-portal.md) from your primary server.
102
109
103
-
3. Upgrade your [read replica to version](#perform-planned-major-version-upgrade-from-mysql-57-to-mysql-80-using-azure-cli) 8.0.
110
+
3. [Upgrade](#perform-a-planned-major-version-upgrade-from-mysql-57-to-mysql-80-using-the-azure-cli) your read replica to version 8.0.
111
+
112
+
4. After you confirm that the replica server is running version 8.0, stop your application from connecting to your primary server.
104
113
105
-
4. Once you confirm that the replica server is running on version 8.0, stop your application from connecting to your primary server.
114
+
5. Check replication status to ensure that the replica has caught up with the primary so that all data is in sync and that no new operations are being performed on the primary.
106
115
107
-
5. Check replication status, and make sure replica is all caught up with primary, so all the data is in sync and ensure there are no new operations performed in primary.
108
-
Confirm with the show slave status command on the replica server to view the replication status.
116
+
6. Confirm with the show slave status command on the replica server to view the replication status.
109
117
110
118
```azurecli
111
119
SHOW SLAVE STATUS\G
112
120
```
113
-
If the state of Slave_IO_Running and Slave_SQL_Running are "yes" and the value of Seconds_Behind_Master is "0", replication is working well. Seconds_Behind_Master indicates how late the replica is. If the value isn't "0", it means that the replica is processing updates. Once you confirm Seconds_Behind_Master is "0" it's safe to stop replication.
121
+
If the state of Slave_IO_Running and Slave_SQL_Running is **yes** and the value of Seconds_Behind_Master is **0**, replication is working well. Seconds_Behind_Master indicates how late the replica is. If the value isn't **0**, then the replica is still processing updates. After you confirm that the value of Seconds_Behind_Master is ****, it's safe to stop replication.
114
122
115
-
6. Promote your read replica to primary by stopping replication.
123
+
7. Promote your read replica to primary by stopping replication.
116
124
117
-
7. Set Server Parameter read_only to 0 that is, OFF to start writing on promoted primary.
125
+
8. Set Server Parameter read_only to **0** (OFF) to start writing on promoted primary.
118
126
119
-
Point your application to the new primary (former replica) which is running server 8.0. Each server has a unique connection string. Update your application to point to the (former) replica instead of the source.
127
+
9. Point your application to the new primary (former replica) which is running server 8.0. Each server has a unique connection string. Update your application to point to the (former) replica instead of the source.
120
128
121
129
>[!Note]
122
-
> This scenario will have downtime during steps 4, 5 and 6 only.
130
+
> This scenario only incur downtime during steps 4 through 7.
123
131
124
132
## Frequently asked questions
125
133
126
-
- Will this cause downtime of the server and if so, how long?
134
+
-**Will this cause downtime of the server and if so, how long?**
135
+
127
136
To have minimal downtime during upgrades, follow the steps mentioned under - [Perform minimal downtime major version upgrade from MySQL 5.7 to MySQL 8.0 using read replicas](#perform-minimal-downtime-major-version-upgrade-from-mysql-57-to-mysql-80-using-read-replicas).
128
137
The server will be unavailable during the upgrade process, so we recommend you perform this operation during your planned maintenance window. The estimated downtime depends on the database size, storage size provisioned (IOPs provisioned), and the number of tables on the database. The upgrade time is directly proportional to the number of tables on the server. To estimate the downtime for your server environment, we recommend to first perform upgrade on restored copy of the server.
129
138
130
139
131
-
- When will this upgrade feature be GA?
132
-
The GA of this feature will be planned by December 2022. However, the feature is production ready and fully supported by Azure so you should run it with confidence in your environment. As a recommended best practice, we strongly suggest you run and test it first on a restored copy of the server so you can estimate the downtime during upgrade, and perform application compatibility test before you run it on production.
140
+
-**When will this upgrade feature be GA?**
141
+
142
+
GA of this feature will be planned by December 2022. However, the feature is production ready and fully supported by Azure so you should run it with confidence in your environment. As a recommended best practice, we strongly suggest you run and test it first on a restored copy of the server so you can estimate the downtime during upgrade, and perform application compatibility test before you run it on production.
143
+
144
+
-**What happens to my backups after upgrade?**
133
145
134
-
- What happens to my backups after upgrade?
135
146
All backups (automated/on-demand) taken before major version upgrade, when used for restoration will always restore to a server with older version (5.7).
136
147
All the backups (automated/on-demand) taken after major version upgrade will restore to server with upgraded version (8.0). It's highly recommended to take on-demand backup before you perform the major version upgrade for an easy rollback.
137
148
138
149
139
150
## Next steps
140
-
- Learn more on [how to configure scheduled maintenance](./how-to-maintenance-portal.md) for your Azure Database for MySQL flexible server.
151
+
- Learn more about[how to configure scheduled maintenance](./how-to-maintenance-portal.md) for your Azure Database for MySQL flexible server.
141
152
- Learn about what's new in [MySQL version 8.0](https://dev.mysql.com/doc/refman/8.0/en/mysql-nutshell.html).
0 commit comments