Skip to content

Commit de251d0

Browse files
committed
Added README.md
1 parent 88dca6c commit de251d0

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
This is a sample work to learn about docker, containers, running MySQL in docker and setting up MySQL
2+
replication using docker containers.
3+
4+
Here is the directory structure and its explanation
5+
6+
MySQLReplDocker
7+
|
8+
+--- conf/
9+
| |
10+
| +--- master1.cnf
11+
| +--- master2.cnf
12+
| +--- slave1.cnf
13+
| +--- slave2.cnf
14+
|
15+
+--- data/
16+
| |
17+
| +--- master1/
18+
| +--- master2/
19+
| +--- slave1/
20+
| +--- slave2/
21+
|
22+
+--- docker/
23+
| |
24+
| +--- master-2-slave.yml
25+
| +--- master-2-master.yml
26+
| +--- slave-2-master-2-master-2-slave.yml
27+
|
28+
+--- scripts/
29+
| |
30+
| +--- common-functions.sh
31+
| +--- master-2-slave.sh
32+
| +--- master-2-master.sh
33+
| +--- slave-2-master-2-master-2-slave.sh
34+
|
35+
+--- start.sh
36+
+--- stop.sh
37+
+--- check_params.sh
38+
39+
40+
The folder "conf" contains the MySQL configuration for master and slave nodes.
41+
The folder "data" contains folders to hold data for master and slave nodes.
42+
The folder "docker" contains the docker container configuation files
43+
The folder "scripts" contains bash script which does the real job of setup of replication between the nodes

docker/master-2-slave.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version: "3"
22
services:
3-
_1:
3+
master_1:
44
image: mysql:5.7.27
55
hostname: ${MASTER_1_HOSTNAME}
66
volumes:

0 commit comments

Comments
 (0)