replication配置过程

1.grant replication slave,replication client on *.* to 'repli_user'@'192.168.0.5' identified by 'testpassword'mysql

2.配置主库(log-bin,server-id,expire_logs_days=5)sql

3.利用主库的备份构建备库ide

4.在备库上启动复制(change master to,start slave)server

change master tossl

master_host='192.168.0.1',同步

master_port=3306,io

master_user='repl_user',ast

master_password='testpassword',test

master_log_file='mysql-bin.000045',cli

master_log_pos=107;

 

show slave status\G

start slave

设置从库read_only=1

在主库插数据而后在从库上验证同步是否正常

主库上查看show processlist

相关文章
相关标签/搜索