Skip to content

Commit 68ace07

Browse files
committed
Update env name and README
1 parent 8b9d140 commit 68ace07

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
FROM mysql:5.7
22

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
56

67
COPY replication-entrypoint.sh /usr/local/bin/
78
COPY init-slave.sh /usr/local/bin/

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ docker run -d -p 3306:3306 \
2121
```bash
2222
docker run -d -p 3307:3306 \
2323
--name mysql_slave \
24-
-e MYSQL_MASTER_HOST=master \
24+
-e MYSQL_MASTER_HOST=mysql_master \
25+
-e MYSQL_MASTER_PORT=3306 \
2526
-e MYSQL_ROOT_PASSWORD=root_password \
2627
-e MYSQL_REPLICATION_USER=user_for_slave \
2728
-e MYSQL_REPLICATION_PASSWORD=user_password_for_slave \
28-
--link mysql_master:master \
29+
--link mysql_master:mysql_master \
2930
mishamx/mysql:5.7
3031
```
3132

0 commit comments

Comments
 (0)