标签:etc grant firewalld 账户 mys 复制 status 数据库 日志
MS复制1.master和slave都关闭防火墙
#systemctl stop firewalld
#setenforce 0
master Mysql
#vim /etc/my.cnf
[ ]
log-bin=mylog
server-id=1
mysq> grant replication slave,reload,super on *.* to ‘slave‘@‘%‘ identified by ‘123‘;
mysql>flush privileges;
#systemctl restart mysqld
slaveMysql
#vim /etc.my.cnf
[mysqld]
server-id=2
#systemctl restart mysqld
mysql> show master status \G
mysql> help change master to
mysql> CHANGE MASTER TO
MASTER_HOST=‘masterIP‘,
MASTER_USER=‘slave‘,
MASTER_PASSWORD=‘123‘,
MASTER_PORT=3306,
MASTER_LOG_FILE=‘mylog.000001‘,
MASTER_LOG_POS=4,
MASTER_CONNECT_RETPY=10;
mysql> start slave;
mysql> show slave status;
标签:etc grant firewalld 账户 mys 复制 status 数据库 日志
原文地址:http://blog.51cto.com/13523939/2065649