Master # Download the image
- Docker pull mysql: 5.6 create mysql – master. On the local CNF note.youdao.com/noteshare?i…
Sudo docker run -e MYSQL_ROOT_PASSWORD=123456 –name mysql-master -v / etc/mysql/mysql – master. CNF: / etc/mysql/my CNF -p 3306:3306 mysql: 5.6 authorization # 3. Grant replication slave on. To ‘slave’ @ ‘%’ identified by ‘slave’; # update 4. 5. show master status;
Notice If the command is null, it may be because the my.cnf file Slave is not mounted
- Docker pull mysql: 5.6 create mysql – master. On the local CNF note.youdao.com/noteshare?i…
2. Sudo docker run -e MYSQL_ROOT_PASSWORD=123456 –name mysql-slave -v / etc/mysql/mysql – slave. CNF: / etc/mysql/my CNF -p 3307:3306 mysql: 5.6 # configuration host 3. Change the master to Master_host = ‘106.12.215.254, master_user =’ root ‘, master_password = ‘123456’, master_log_file = ‘000005’ mysql – bin., master_log_p os=532,master_port=3306; 4start slave; 5. Show slave status \G
Link: note.youdao.com/noteshare?i…