mysql互为主从复制配置笔记(3)
来源:未知 责任编辑:责任编辑 发表时间:2014-02-18 03:27 点击:次
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 374
Relay_Log_Space: 235
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: 0
1 row in set (0.00 sec)
红色标注部分为192.168.72.128主机中show master status命令结果中的file postion两个值
3、将192.168.72.129设为192.168.72.128的主服务器
在192.168.72.129上新建授权用户
MySQL> grant replication slave on *.* to 'replication'@'%' identified by 'replication';
Query OK, 0 rows affected (0.00 sec)
MySQL>flush privileges;
Query OK, 0 rows affected (0.00 sec)
MySQL> show master status;
+------------------+----------+--------------+------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+------------------+----------+--------------+------------------+
| MySQL-bin.000003 | 374 | | |
+------------------+----------+--------------+------------------+
1 row in set (0.00 sec)
----------------------------------------------------------------------------------
在192.168.72.128将192.168.72.129为自己的主服务器
MySQL> change master to master_host='192.168.72.129',master_user='replication',master_password='replication',master_log_file='MySQL-bin.000003',master_log_pos=374;
Query OK, 0 rows affected (0.05 sec)
MySQL> start slave;
Query OK, 0 rows affected (0.00 sec)
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>