1,关闭防火墙
对主服务器master关闭 (192.168.245.132 )
slave从服务器也关闭(192.168.245.133)
/etc/init.d/iptables stop
# 永久关闭
chkconfig iptables off
2,配置主服务器 主服务器运行(132)
vi /usr/local/mysql/my.cnf
在[mysqld]节点下配置
log_bin=mysql-bin
server-id=132 (为ip地址的最后一段)
3,启动mysql服务,并连接 主服务器运行(132)
cd /usr/mysql/bin
./mysql -uroot -p
service mysql start
4,授权slave服务器 主服务器运行(132)
mysql>GRANT REPLICATION SLAVE ON *.* to 'root'@'192.1