mysql互为主从复制配置笔记(2)
来源:未知 责任编辑:责任编辑 发表时间:2014-02-18 03:27 点击:次
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.129将192.168.72.128为自己的主服务器
MySQL> change master to master_host='192.168.72.128',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)
MySQL> show slave status/G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.72.128
Master_User: replication
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: MySQL-bin.000003
Read_Master_Log_Pos: 374
Relay_Log_File: MySQL-master2-relay-bin.000002
Relay_Log_Pos: 235
Relay_Master_Log_File: MySQL-bin.000003
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>