记录 环境:ubuntu16.04,mysql5.7 主机:192.168.1.240,192.168.1.241:241为Salve 1.安装mysql sudo apt-get install mysql-server 2.为master增加slave用户 进入mysql grant replication slave on *.* to 'slave'@'192.168.1.241' identified by 'password'; 3.编辑配置文件 master: vim /etc/m