File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 1- ### Replicate MYSQL master-slave with Ansible ## #
1+ # Replicate MYSQL master-slave with Ansible #
22We will set up the replication with type GTID: master-slave , master-multi slaves
33</br >1. Install ansible and ansible-playbook version 2.0
44</br >2. Install Docker in the destination host
@@ -8,7 +8,7 @@ We will set up the replication with type GTID: master-slave , master-multi slav
88 </br >  ;  ;  ; 4.2 on database-slave/vars: replace the docker_container.master_host with the HOST masterdb
99</br >5. Run ansible for deploying: ansible-playbook -i hosts database.yml
1010
11- #Some commands to check the replication:
11+ ### Some commands to check the replication:###
1212</br >  ;  ;  ; $ docker exec -ti slavedb 'mysql' -uroot -pmysecretpass -e"SHOW SLAVE STATUS;" -vvv
1313</br >  ;  ;  ; $ docker exec -ti masterdb 'mysql' -uroot -pmysecretpass -e"SHOW SLAVE HOSTS;" -vvv
1414</br >  ;  ;  ; $ docker exec -ti masterdb 'mysql' -uroot -pmysecretpass -e"SHOW MASTER STATUS;" -vvvv
You can’t perform that action at this time.
0 commit comments