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: README.md
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -64,6 +64,8 @@ Most of the variables listed below are optional, but one of the variables `MYSQL
64
64
65
65
This variable specifies a password that will be set for the MySQL root superuser account. In the above example, it was set `to my-secret-pw`. **NOTE:** Setting the MySQL root user password on the command line is insecure. See the section *Secure Container Startup* below for an alternative.
66
66
67
+
As an alternative to specifying the password explicitly, if the variable is set to a file path, the contents of the file will be used as the root password.
68
+
67
69
## `MYSQL_RANDOM_ROOT_PASSWORD`
68
70
69
71
When this variable is set to `yes`, a random password for the server's root user will be generated. The password will be printed to stdout in the container, and it can be obtained by using the command `docker logs my-container-name`.
@@ -111,6 +113,10 @@ And finally, on the mysql client command line, set a new, secure root password f
111
113
112
114
ALTER USER root IDENTIFIED BY 'my-secret-pw';
113
115
116
+
An alternative is to use MYSQL_ROOT_PASSWORD, but set it to point to a file that contains the password. This provides better security than having the password on the command line and is easier to use in automated processes than the random password:
There are basically two ways to store data used by applications that run in Docker containers. We encourage users of MySQL with Docker to familiarize themselves with the options available, including:
@@ -195,4 +201,4 @@ These images are officially supported by the MySQL team on Docker version 1.9. S
195
201
196
202
# User Feedback
197
203
198
-
We welcome your feedback! For general comments or discussion, please drop us a line in the Comments section below. For bugs and issues, please submit a bug report at http://bugs.mysql.com under the category "MySQL Package Repos and Docker Images".
204
+
We welcome your feedback! For general comments or discussion, please drop us a line in the Comments section below. For bugs and issues, please submit a bug report at http://bugs.mysql.com under the category "MySQL Package Repos and Docker Images".
0 commit comments