目录
一、MySQL主从复制原理就不做讲解了,详情请查看MySQL专栏
2、进入/usr/mysql/mysql-master/conf目录下新建my.cnf
7、进去/usr/mysql/mysql-slave/conf目录下新建my.cnf
一、MySQL主从复制原理就不做讲解了,详情请查看MySQL专栏
二、主从复制搭建步骤
1、新建主服务器容器实例3307
[root@localhost conf]# docker run -p 3307:3306
-v /usr/mysql/mysql-master/log:/var/log/mysql \
-v /usr/mysql/mysql-master/data:/var/lib/mysql \
-v /usr/mysql/mysql-master/conf:/etc/mysql \
-e MYSQL_ROOT_PASSWORD=123456 \
--name=mysql-master \
-d mysql:5.7
cb51f77c7b6294cb5f7b12624c2a1ac430bb406c75dd2d386d8c32a97b2a8eae
[root@localhost conf]#
[root@localhost conf]#
[ro