Skip to content

Commit c3741c7

Browse files
Merge pull request #13356 from MicrosoftDocs/ghogen-patch-76
Restore original var name
2 parents 5aa77d5 + 87991a3 commit c3741c7

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

docker/tutorials/tutorial-multi-container-app-mysql.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@ In this example, you create the network and attach the MySQL container at startu
8989
--network todo-app --network-alias mysql
9090
-v todo-mysql-data:/var/lib/mysql
9191
-e MYSQL_ROOT_PASSWORD=<your-password>
92-
-e MYSQL_DATABASE=todos
92+
-e MYSQL_DB=todos
9393
mysql:5.7
9494
```
9595

96-
This command also defines the `MYSQL_ROOT_PASSWORD` and `MYSQL_DATABASE` environment variables. For more information, see [MySQL Docker Hub listing](https://hub.docker.com/_/mysql/).
96+
This command also defines the `MYSQL_ROOT_PASSWORD` and `MYSQL_DB` environment variables. For more information, see [MySQL Docker Hub listing](https://hub.docker.com/_/mysql/).
9797

9898
> [!WARNING]
9999
> This tutorial illustrates password credentials to authenticate with a MySQL database, which is not the most secure method. Refer to the [MySQL documentation](https://dev.mysql.com/doc/) to learn about more secure methods of authentication.
@@ -146,7 +146,7 @@ The `todo` app supports setting certain environment variables to specify your My
146146
| `MYSQL_HOST` | `mysql` | The host name for the MySQL server. |
147147
| `MYSQL_USER` | `root` | The username to use for the connection. |
148148
| `MYSQL_PASSWORD` | `<your-password>` | The password to use for the connection. In this example, substitute your root password for the `<your-password>` placeholder. |
149-
| `MYSQL_DATABASE` | `todos` | The name of the database to use after the connection is established. |
149+
| `MYSQL_DB` | `todos` | The name of the database to use after the connection is established. |
150150

151151
> [!WARNING]
152152
> Using environment variables to set connection settings is acceptable for development, but this practice isn't recommended for running applications in production. For more information, see [Why you shouldn't use environment variables for secret data](https://diogomonica.com/2017/03/27/why-you-shouldnt-use-env-variables-for-secret-data/).
@@ -166,7 +166,7 @@ In the following example, you start your app and connect your app container to y
166166
-e MYSQL_HOST=mysql
167167
-e MYSQL_USER=root
168168
-e MYSQL_PASSWORD=<your-password>
169-
-e MYSQL_DATABASE=todos
169+
-e MYSQL_DB=todos
170170
node:20-alpine
171171
sh -c "yarn install && yarn run dev"
172172
```
@@ -255,7 +255,7 @@ In the following example, you configure a Docker Compose file for your multi-con
255255
-e MYSQL_HOST=mysql
256256
-e MYSQL_USER=root
257257
-e MYSQL_PASSWORD=<your-password>
258-
-e MYSQL_DATABASE=todos
258+
-e MYSQL_DB=todos
259259
node:20-alpine
260260
sh -c "yarn install && yarn run dev"
261261
```
@@ -320,7 +320,7 @@ In the following example, you configure a Docker Compose file for your multi-con
320320
MYSQL_HOST: mysql
321321
MYSQL_USER: root
322322
MYSQL_PASSWORD: <your-password>
323-
MYSQL_DATABASE: todos
323+
MYSQL_DB: todos
324324
```
325325

326326
Remember to enter your MySQL root password for the `<your-password>` placeholder.
@@ -361,7 +361,7 @@ In the following example, you configure a Docker Compose file for your multi-con
361361
- todo-mysql-data:/var/lib/mysql
362362
environment:
363363
MYSQL_ROOT_PASSWORD: <your-password>
364-
MYSQL_DATABASE: todos
364+
MYSQL_DB: todos
365365
```
366366

367367
Remember to enter your MySQL root password for the `<your-password>` placeholder.
@@ -394,15 +394,15 @@ In the following example, you configure a Docker Compose file for your multi-con
394394
MYSQL_HOST: mysql
395395
MYSQL_USER: root
396396
MYSQL_PASSWORD: <your-password>
397-
MYSQL_DATABASE: todos
397+
MYSQL_DB: todos
398398
399399
mysql:
400400
image: mysql:5.7
401401
volumes:
402402
- todo-mysql-data:/var/lib/mysql
403403
environment:
404404
MYSQL_ROOT_PASSWORD: <your-password>
405-
MYSQL_DATABASE: todos
405+
MYSQL_DB: todos
406406
407407
volumes:
408408
todo-mysql-data:

0 commit comments

Comments
 (0)