File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 1
1
FROM mysql:5.7
2
2
3
- ENV REPLICATION_USER replication
4
- ENV REPLICATION_PASSWORD replication_pass
3
+ ENV MYSQL_REPLICATION_USER replication
4
+ ENV MYSQL_REPLICATION_PASSWORD replication_pass
5
+ ENV MYSQL_MASTER_PORT 3306
5
6
6
7
COPY replication-entrypoint.sh /usr/local/bin/
7
8
COPY init-slave.sh /usr/local/bin/
Original file line number Diff line number Diff line change @@ -21,11 +21,12 @@ docker run -d -p 3306:3306 \
21
21
``` bash
22
22
docker run -d -p 3307:3306 \
23
23
--name mysql_slave \
24
- -e MYSQL_MASTER_HOST=master \
24
+ -e MYSQL_MASTER_HOST=mysql_master \
25
+ -e MYSQL_MASTER_PORT=3306 \
25
26
-e MYSQL_ROOT_PASSWORD=root_password \
26
27
-e MYSQL_REPLICATION_USER=user_for_slave \
27
28
-e MYSQL_REPLICATION_PASSWORD=user_password_for_slave \
28
- --link mysql_master:master \
29
+ --link mysql_master:mysql_master \
29
30
mishamx/mysql:5.7
30
31
```
31
32
You can’t perform that action at this time.
0 commit comments