Skip to content

Commit 6b13e33

Browse files
committed
fix keyvault section
1 parent 59b6bda commit 6b13e33

8 files changed

+29
-16
lines changed
-85.8 KB
Loading
-63.2 KB
Loading
44.2 KB
Loading
-50.5 KB
Loading
8.58 KB
Loading
1.44 KB
Loading
182 KB
Loading

articles/app-service/tutorial-php-mysql-app.md

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,10 @@ The creation wizard generated the connectivity variables for you already as [app
174174
:::column span="2":::
175175
**Step 1: Retrieve the existing connection string**
176176
1. In the left menu of the App Service page, select **Settings > Environment variables**.
177-
1. Select **AZURE_MYSQL_PASSWORD**.
178-
1. In **Add/Edit application setting**, in the **Value** field, copy the password string for use later.
179-
The app settings you see let you connect to the MySQL database and Redis cache secured behind private endpoints. However, the secrets are saved directly in the App Service app, which isn't the best. You'll change this.
177+
1. Select **Connection strings**.
178+
1. Select **AZURE_MYSQL_CONNECTIONSTRING**.
179+
1. In **Add/Edit application setting**, in the **Value** field, copy the username and password for use later.
180+
The connection string lets you connect to the MySQL database secured behind private endpoints. However, the secrets are saved directly in the App Service app, which isn't the best. You'll change this.
180181
:::column-end:::
181182
:::column:::
182183
:::image type="content" source="./media/tutorial-php-mysql-app/azure-portal-secure-connection-secrets-1.png" alt-text="A screenshot showing how to see the value of an app setting." lightbox="./media/tutorial-php-mysql-app/azure-portal-secure-connection-secrets-1.png":::
@@ -214,37 +215,49 @@ The creation wizard generated the connectivity variables for you already as [app
214215
:::row-end:::
215216
:::row:::
216217
:::column span="2":::
217-
**Step 4: Configure the MySQL connector**
218+
**Step 4: Create the MySQL connector**
218219
1. In the top search bar, type *msdocs-laravel-mysql*, then select the App Service resource called **msdocs-laravel-mysql-XYZ**.
219-
1. In the App Service page, in the left menu, select **Settings > Service Connector**. There are already two connectors, which the app creation wizard created for you.
220-
1. Select checkbox next to the MySQL connector, then select **Edit**.
220+
1. In the App Service page, in the left menu, select **Settings > Service Connector**.
221+
1. Select **Create**.
222+
1. For **Service type**, select **DB for MySQL flexible server**.
223+
1. For **MySQL flexible server**, select your server (for example, **msdocs-laravel-mysql-235-server**).
224+
1. For **MySQL database**, select your database (for example, **msdocs-laravel-mysql-235-database**).
225+
:::column-end:::
226+
:::column:::
227+
:::image type="content" source="./media/tutorial-php-mysql-app/azure-portal-secure-connection-secrets-4.png" alt-text="A screenshot showing how to edit a service connector with a key vault connection." lightbox="./media/tutorial-php-mysql-app/azure-portal-secure-connection-secrets-4.png":::
228+
:::column-end:::
229+
:::row-end:::
230+
:::row:::
231+
:::column span="2":::
232+
**Step 5: Configure authentication for the MySQL connector**
221233
1. Select the **Authentication** tab.
234+
1. Select **Connection string**.
222235
1. In **Password**, paste the password you copied earlier.
223236
1. Select **Store Secret in Key Vault**.
224237
1. Under **Key Vault Connection**, select **Create new**.
225238
A **Create connection** dialog is opened on top of the edit dialog.
226239
:::column-end:::
227240
:::column:::
228-
:::image type="content" source="./media/tutorial-php-mysql-app/azure-portal-secure-connection-secrets-4.png" alt-text="A screenshot showing how to edit a service connector with a key vault connection." lightbox="./media/tutorial-php-mysql-app/azure-portal-secure-connection-secrets-4.png":::
241+
:::image type="content" source="./media/tutorial-php-mysql-app/azure-portal-secure-connection-secrets-5.png" alt-text="A screenshot showing how to edit a service connector with a key vault connection." lightbox="./media/tutorial-php-mysql-app/azure-portal-secure-connection-secrets-5.png":::
229242
:::column-end:::
230243
:::row-end:::
231244
:::row:::
232245
:::column span="2":::
233-
**Step 5: Establish the Key Vault connection**
246+
**Step 6: Establish the Key Vault connection**
234247
1. In the **Create connection** dialog for the Key Vault connection, in **Key Vault**, select the key vault you created earlier.
235248
1. Select **Review + Create**.
236249
1. When validation completes, select **Create**.
237250
:::column-end:::
238251
:::column:::
239-
:::image type="content" source="./media/tutorial-php-mysql-app/azure-portal-secure-connection-secrets-5.png" alt-text="A screenshot showing how to configure a key vault service connector." lightbox="./media/tutorial-php-mysql-app/azure-portal-secure-connection-secrets-5.png":::
252+
:::image type="content" source="./media/tutorial-php-mysql-app/azure-portal-secure-connection-secrets-6.png" alt-text="A screenshot showing how to configure a key vault service connector." lightbox="./media/tutorial-php-mysql-app/azure-portal-secure-connection-secrets-6.png":::
240253
:::column-end:::
241254
:::row-end:::
242255
:::row:::
243256
:::column span="2":::
244257
**Step 6: Finalize the MySQL connector settings**
245-
1. You're back in the edit dialog for **defaultConnector**. In the **Authentication** tab, wait for the key vault connector to be created. When it's finished, the **Key Vault Connection** dropdown automatically selects it.
246-
1. Select **Next: Networking**.
247-
1. Select **Save**. Wait until the **Update succeeded** notification appears.
258+
1. You're back in the MySQL connector dialog. In the **Authentication** tab, wait for the key vault connector to be created. When it's finished, the **Key Vault Connection** dropdown automatically selects it.
259+
1. Select **Review + Create**.
260+
1. Select **Create**. Wait until the **Update succeeded** notification appears.
248261
:::column-end:::
249262
:::column:::
250263
:::image type="content" source="./media/tutorial-php-mysql-app/azure-portal-secure-connection-secrets-6.png" alt-text="A screenshot showing the key vault connection selected in the defaultConnector." lightbox="./media/tutorial-php-mysql-app/azure-portal-secure-connection-secrets-6.png":::
@@ -359,10 +372,10 @@ In this step, you configure GitHub deployment using GitHub Actions. It's just on
359372
1. Replace `DB_PASSWORD` (line 53) with `AZURE_MYSQL_PASSWORD`.
360373
1. Replace `DB_PORT` (line 50) with `AZURE_MYSQL_PORT`.
361374
1. Scroll to the Redis `cache` section and make the following changes:
362-
1. Replace `REDIS_HOST` (line ) with `AZURE_REDIS_HOST`.
363-
1. Replace `REDIS_PASSWORD` with `AZURE_REDIS_PASSWORD`.
364-
1. Replace `REDIS_PORT` with `AZURE_REDIS_PORT`.
365-
1. Replace `REDIS_CACHE_DB` with `AZURE_REDIS_DATABASE`.
375+
1. Replace `REDIS_HOST` (line 142) with `AZURE_REDIS_HOST`.
376+
1. Replace `REDIS_PASSWORD` (line 144) with `AZURE_REDIS_PASSWORD`.
377+
1. Replace `REDIS_PORT` (line 145) with `AZURE_REDIS_PORT`.
378+
1. Replace `REDIS_CACHE_DB` (line 146) with `AZURE_REDIS_DATABASE`.
366379
1. In the same section, add a line with `'scheme' => 'tls',`. This configuration tells Laravel to use encryption to connect to Redis.
367380
:::column-end:::
368381
:::column:::

0 commit comments

Comments
 (0)