mysql-5.6主从复制及遇到的错误(二)

2014-11-24 13:35:08 · 作者: · 浏览: 5
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 330
Relay_Log_Space: 120
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: 0
Master_UUID:
Master_Info_File: /database/master.info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State:
Master_Retry_Count: 86400
Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp:
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set:
Executed_Gtid_Set:
Auto_Position: 0
1 row in set (0.00 sec)
mysql> start slave;
Query OK, 0 rows affected (0.05 sec)
4、测试
在master上新建表,
mysql> use blog;
Database changed
mysql> create table hi_tb(id int(3),name char(10));
Query OK, 0 rows affected (0.14 sec)
mysql>
show tables;
+----------------+
| Tables_in_blog |
+----------------+
| hi_tb |
+----------------+
1 row in set (0.00 sec)
在slave查看
mysql> use blog;
Database changed
mysql> show tables;
Empty set (0.00 sec)
mysql slave没有发现新建的表,说明主从复制中间出了问题,所以需要查看mysql错误日志
tail -f /var/log/mysql/mysql.error
2013-09-22 15:39:21 2150 [Warning] Storing MySQL user name or password information in the master.info repository is not secure and is therefore not recommended. Please see the MySQL Manual for more about this issue and possible alternatives.
2013-09-22 15:39:21 2150 [Note] Slave I/O thread: connected to master 'master@192.168.254.46:3306',replication started in log 'mysql-bin.000011' at position 330
2013-09-22 15:39:21 2150 [Warning] Slave SQL: If a crash happens this configuration does not guarantee that the relay log info will be consistent, Error_code: 0
2013-09-22 15:39:21 2150 [Note] Slave SQL thread initialized, starting replication in log 'mysql-bin.000011' at position 330, relay log './wordpress-relay-bin.000001' position: 4
2013-09-22 15:39:21 2150 [ERROR] Slave I/O: Master command COM_REGISTER_SLAVE failed: Access denied for user 'master'@'192.168.254.153' (using password: YES) (Errno: 1045), Error_code: 1597
2013-09-22 15:39:21 2150 [ERROR] Slave I/O thread couldn't register on master
2013-09-22 15:39:21 2150 [Warning] Slave I/O: Master command COM_REGISTER_SLAVE failed: failed registering on master, reconnecting to try again, log 'mysql-bin.000011' at position 330, Error_code: 1597
2013-09-22 15:39:21 2150 [Warning] Storing MySQL user name or password information in the master.info repository is not secure and is therefore not recommended. Please see the MySQL Manual for more about this issue and possible alternatives.
2013-09-22 15:39:21 2150 [ERROR] Slave I/O: Master command COM_REGISTER_SLAVE failed: Access denied for user '