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
{{ message }}
This repository was archived by the owner on Nov 29, 2020. It is now read-only.
In this case, `47nnf4FweaKu` is the password allocated to the `admin` user.
42
42
43
-
Remember that the `root` user has no password but it's only accesible from within the container.
43
+
Remember that the `root` user has no password but it's only accessible from within the container.
44
44
45
45
You can now test your deployment:
46
46
47
-
mysql -uadmin -p
47
+
mysql -uadmin -p
48
48
49
49
Done!
50
50
@@ -55,11 +55,11 @@ Setting a specific password for the admin account
55
55
If you want to use a preset password instead of a random generated one, you can
56
56
set the environment variable `MYSQL_PASS` to your specific password when running the container:
57
57
58
-
docker run -d -p 3306:3306 -e MYSQL_PASS="mypass" tutum/mysql
58
+
docker run -d -p 3306:3306 -e MYSQL_PASS="mypass" tutum/mysql
59
59
60
60
You can now test your deployment:
61
61
62
-
mysql -uadmin -p"mypass"
62
+
mysql -uadmin -p"mypass"
63
63
64
64
The admin username can also be set via the MYSQL_USER environment variable.
65
65
@@ -70,15 +70,15 @@ Mounting the database file volume
70
70
In order to persist the database data, you can mount a local folder from the host
71
71
on the container to store the database files. To do so:
72
72
73
-
docker run -d -v /path/in/host:/var/lib/mysql tutum/mysql /bin/bash -c "/usr/bin/mysql_install_db"
73
+
docker run -d -v /path/in/host:/var/lib/mysql tutum/mysql /bin/bash -c "/usr/bin/mysql_install_db"
74
74
75
75
This will mount the local folder `/path/in/host` inside the docker in `/var/lib/mysql` (where MySQL will store the database files by default). `mysql_install_db` creates the initial database structure.
76
76
77
77
Remember that this will mean that your host must have `/path/in/host` available when you run your docker image!
78
78
79
79
After this you can start your mysql image but this time using `/path/in/host` as the database folder:
80
80
81
-
docker run -d -p 3306:3306 -v /path/in/host:/var/lib/mysql tutum/mysql
81
+
docker run -d -p 3306:3306 -v /path/in/host:/var/lib/mysql tutum/mysql
82
82
83
83
84
84
Mounting the database file volume from other containers
@@ -104,17 +104,17 @@ In order to migrate your current MySQL server, perform the following commands fr
0 commit comments