This repository was archived by the owner on Jan 6, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +11
-14
lines changed Expand file tree Collapse file tree 5 files changed +11
-14
lines changed Original file line number Diff line number Diff line change @@ -18,28 +18,27 @@ Using the `docker` command:
18
18
-p 3306:3306 \
19
19
--volumes-from mysql-data \
20
20
-e TIMEZONE="Etc/UTC" \
21
- -e PASSWORD="root" \
22
21
-e GENERAL_LOG="0" \
23
22
-e SLOW_QUERY_LOG="0" \
24
23
-e LONG_QUERY_TIME="1" \
25
24
-d \
26
- dockerizedrupal/mysql:1.0.8
25
+ dockerizedrupal/mysql:1.0.9
27
26
28
27
Using the ` docker-compose ` command
29
28
30
29
TMP="$(mktemp -d)" \
31
30
&& git clone https://github.com/dockerizedrupal/docker-mysql.git "${TMP}" \
32
31
&& cd "${TMP}" \
33
- && git checkout 1.0.8 \
32
+ && git checkout 1.0.9 \
34
33
&& sudo docker-compose up
35
34
36
35
## Build the image
37
36
38
37
TMP="$(mktemp -d)" \
39
38
&& git clone https://github.com/dockerizedrupal/docker-mysql.git "${TMP}" \
40
39
&& cd "${TMP}" \
41
- && git checkout 1.0.8 \
42
- && sudo docker build -t dockerizedrupal/mysql:1.0.8 . \
40
+ && git checkout 1.0.9 \
41
+ && sudo docker build -t dockerizedrupal/mysql:1.0.9 . \
43
42
&& cd -
44
43
45
44
## Back up MySQL data
Original file line number Diff line number Diff line change 1
- 1.0.8
1
+ 1.0.9
Original file line number Diff line number Diff line change 1
1
mysql :
2
- image : dockerizedrupal/mysql:1.0.8
2
+ image : dockerizedrupal/mysql:1.0.9
3
3
hostname : mysql
4
4
ports :
5
5
- " 3306:3306"
6
6
volumes_from :
7
7
- mysql-data
8
8
environment :
9
9
- TIMEZONE=Etc/UTC
10
- - PASSWORD=root
11
10
- GENERAL_LOG=0
12
11
- SLOW_QUERY_LOG=0
13
12
- LONG_QUERY_TIME=1
Original file line number Diff line number Diff line change @@ -5,6 +5,9 @@ puppet apply --modulepath=/src/mysql/run/modules /src/mysql/run/run.pp
5
5
DATA=" /mysql/data"
6
6
7
7
if [ ! " $( ls -A ${DATA} ) " ]; then
8
+ USER=" container"
9
+ PASSWORD=" container"
10
+
8
11
mysql_install_db --user=" mysql" > /dev/null 2>&1
9
12
mysqld_safe > /dev/null 2>&1 &
10
13
@@ -23,9 +26,9 @@ if [ ! "$(ls -A ${DATA})" ]; then
23
26
24
27
mysql -u root -e " CREATE USER 'root'@'%' IDENTIFIED BY '${PASSWORD} ';"
25
28
mysql -u root -e " GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;"
29
+ mysql -u root -e " RENAME USER 'root' TO '${USER} ';"
26
30
27
- mysqladmin -u root password " ${PASSWORD} "
28
- mysqladmin -u root -p" ${PASSWORD} " shutdown
31
+ mysqladmin -u " ${USER} " -p" ${PASSWORD} " shutdown
29
32
fi
30
33
31
34
chown -R mysql.mysql " ${DATA} "
Original file line number Diff line number Diff line change 6
6
7
7
export FACTER_TIMEZONE=" ${TIMEZONE} "
8
8
9
- if [ -z " ${PASSWORD} " ]; then
10
- export PASSWORD=" root"
11
- fi
12
-
13
9
if [ -z " ${GENERAL_LOG} " ]; then
14
10
GENERAL_LOG=" 0"
15
11
fi
You can’t perform that action at this time.
0 commit comments