teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

1

コメントにつけたらめだってなかったかな

2020/06/04 13:47

投稿

退会済みユーザー
answer CHANGED
@@ -23,4 +23,17 @@
23
23
  url: jdbc:mysql://192.168.99.100/db_name
24
24
  ```
25
25
 
26
- こちらも同様に
26
+ こちらも同様に
27
+
28
+ ## 追記
29
+ #### mysql イメージを利用する場合にユーザー作成が必須な場合は基本こちらを利用しましょう
30
+
31
+
32
+ > **MYSQL_DATABASE**
33
+ >
34
+ > This variable is optional and allows you to specify the name of a database to be created on image startup. If a user/password was supplied (see below) then that user will be granted superuser access (corresponding to GRANT ALL) to this database.
35
+ >
36
+ > **MYSQL_USER, MYSQL_PASSWORD**
37
+ > These variables are optional, used in conjunction to create a new user and to set that user's password. This user will be granted superuser permissions (see above) for the database specified by the MYSQL_DATABASE variable. Both variables are required for a user to be created.
38
+ >
39
+ > Do note that there is no need to use this mechanism to create the root superuser, that user gets created by default with the password specified by the MYSQL_ROOT_PASSWORD variable.