File tree Expand file tree Collapse file tree 2 files changed +44
-1
lines changed Expand file tree Collapse file tree 2 files changed +44
-1
lines changed Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change 1
1
version : " 3"
2
2
services :
3
- _1 :
3
+ master_1 :
4
4
image : mysql:5.7.27
5
5
hostname : ${MASTER_1_HOSTNAME}
6
6
volumes :
You can’t perform that action at this time.
0 commit comments