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/howto-redirection.md
+5-7Lines changed: 5 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ author: ajlam
5
5
ms.author: andrela
6
6
ms.service: mysql
7
7
ms.topic: conceptual
8
-
ms.date: 03/16/2020
8
+
ms.date: 05/18/2020
9
9
---
10
10
11
11
# Connect to Azure Database for MySQL with redirection
@@ -15,8 +15,6 @@ This topic explains how to connect an application your Azure Database for MySQL
15
15
## Before you begin
16
16
Sign in to the [Azure portal](https://portal.azure.com). Create an Azure Database for MySQL server with engine version 5.6, 5.7, or 8.0. For details, refer to [How to create Azure Database for MySQL server from Portal](quickstart-create-mysql-server-database-using-azure-portal.md) or [How to create Azure Database for MySQL server using CLI](quickstart-create-mysql-server-database-using-azure-cli.md).
17
17
18
-
Redirection is currently only supported when **SSL is enabled** on your Azure Database for MySQL server. For details on how to configure SSL, see [Using SSL with Azure Database for MySQL](howto-configure-ssl.md#step-3--enforcing-ssl-connections-in-azure).
19
-
20
18
## PHP
21
19
22
20
Support for redirection in PHP applications is available through the [mysqlnd_azure](https://github.com/microsoft/mysqlnd_azure) extension, developed by Microsoft.
@@ -38,8 +36,8 @@ If you are using an older version of the mysqlnd_azure extension (version 1.0.0-
|`on` or `1`|- If SSL is not enabled on the Azure Database for MySQL server, no connection will be made. The following error will be returned: *"mysqlnd_azure.enableRedirect is on, but SSL option is not set in connection string. Redirection is only possible with SSL."*<br>- If SSL is enabled on the MySQL server, but redirection is not supported on the server, the first connection is aborted and the following error is returned: *"Connection aborted because redirection is not enabled on the MySQL server or the network package doesn't meet redirection protocol."*<br>- If the MySQL server supports redirection, but the redirected connection failed for any reason, also abort the first proxy connection. Return the error of the redirected connection.|
42
-
|`preferred` or `2`<br> (default value)|- mysqlnd_azure will use redirection if possible.<br>- If the connection does not use SSL, the server does not support redirection, or the redirected connection fails to connect for any non-fatal reason while the proxy connection is still a valid one, it will fall back to the first proxy connection.|
39
+
|`on` or `1`|- If the connection does not use SSL on the driver side, no connection will be made. The following error will be returned: *"mysqlnd_azure.enableRedirect is on, but SSL option is not set in connection string. Redirection is only possible with SSL."*<br>- If SSL is used on the driver side, but redirection is not supported on the server, the first connection is aborted and the following error is returned: *"Connection aborted because redirection is not enabled on the MySQL server or the network package doesn't meet redirection protocol."*<br>- If the MySQL server supports redirection, but the redirected connection failed for any reason, also abort the first proxy connection. Return the error of the redirected connection.|
40
+
|`preferred` or `2`<br> (default value)|- mysqlnd_azure will use redirection if possible.<br>- If the connection does not use SSL on the driver side, the server does not support redirection, or the redirected connection fails to connect for any non-fatal reason while the proxy connection is still a valid one, it will fall back to the first proxy connection.|
43
41
44
42
The subsequent sections of the document will outline how to install the `mysqlnd_azure` extension using PECL and set the value of this parameter.
45
43
@@ -49,7 +47,7 @@ The subsequent sections of the document will outline how to install the `mysqlnd
49
47
- PHP versions 7.2.15+ and 7.3.2+
50
48
- PHP PEAR
51
49
- php-mysql
52
-
- Azure Database for MySQL server with SSL enabled
50
+
- Azure Database for MySQL server
53
51
54
52
1. Install [mysqlnd_azure](https://github.com/microsoft/mysqlnd_azure) with [PECL](https://pecl.php.net/package/mysqlnd_azure). It is recommended to use version 1.1.0+.
55
53
@@ -87,7 +85,7 @@ The subsequent sections of the document will outline how to install the `mysqlnd
87
85
#### Prerequisites
88
86
- PHP versions 7.2.15+ and 7.3.2+
89
87
- php-mysql
90
-
- Azure Database for MySQL server with SSL enabled
88
+
- Azure Database for MySQL server
91
89
92
90
1. Determine if you are running a x64 or x86 version of PHP by running the following command:
0 commit comments