2.6.32-220.el6.x86_64
Enter password:输入mysql密码
...............................
................................
character_set_server=utf8
binlog-ignore-db = mysql
binlog-do-db = bbsdb
binlog-do-db = phpmyadmin
replicate-do-db = phpmyadmin
binlog-ignore-db = test
# master-host = 192.168.0.18
#master-user = bak
#master-password = wdmysql
#master-port = 3306
#master-connect-retry = 60
replicate-ignore-db = mysql
replicate-ignore-db = test
replicate-do-db = bbsdb
2.6.32-220.el6.x86_64
Enter password:输入mysql密码
...............................
................................
#master-user = bak # 指定在主服务器上可以进行同步的用户名
#master-password = wdmysql # 密码
#master-port = 3306 # 同步所用端口
#master-connect-retry = 60 # 断点从新连接时间
replicate-ignore-db = mysql # 屏蔽对mysql库的同步
replicate-ignore-db = test # 屏蔽对test库的同步
binlog-ignore-db =mysql
binlog-do-db = bbsdb # 二进制需要同步的数据库名
replicate-do-db = phpmyadmin # 同步的数据库的名称
binlog-do-db = phpmyadmin # 二进制需要同步的数据库名
binlog-ignore-db = test
Enter password:输入mysql密码
Slave_SQL_Running: Yes
*************************** 1. row ***************************
Slave_IO_State:
Master_Host: 192.168.0.18
Master_User: bak
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000003
Read_Master_Log_Pos: 107
Relay_Log_File: server7-relay-bin.000002
Relay_Log_Pos: 253
Relay_Master_Log_File: mysql-bin.000003
Slave_IO_Running: No
Slave_SQL_Running: Yes
Replicate_Ignore_DB: mysql,test
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 107
Relay_Log_Space: 411
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: NULL
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 2
1 row in set (0.00 sec)
mysql> grant replication slave on *.* to bak@192.168.0.18 identified by 'wdmysql';
+------------------+----------+------------------+------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+------------------+----------+------------------+------------------+
| mysql-bin.000003 | 107 | bbsdb,phpmyadmin | mysql,test |
+------------------+----------+------------------+------------------+
1 row in set (0.00 sec)
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.0.18
Master_User: bak
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000003
Read_Master_Log_Pos: 107
Relay_Log_File: server7-relay-bin.000003
Relay_Log_Pos: 253
Relay_Master_Log_File: mysql-bin.000003
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB: phpmyadmin,bbsdb
Replicate_Ignore_DB: mysql,test
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 107
Relay_Log_Space: 557
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
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 2
1 row in set (0.00 sec)