MySQL SLAVE故障一例
有一個slave的埠是3306,我想再建立一個slave,埠為3307
透過冷備份的方式,把3306停機cp,也修改了my.cnf裡的server_id等引數,但是啟動的時候報錯,如下:
因為檔案的路徑改變了,所以報錯,解決起來很簡單,直接reset slave即可。
然後用change master指向到master
啟動slave
檢查
透過冷備份的方式,把3306停機cp,也修改了my.cnf裡的server_id等引數,但是啟動的時候報錯,如下:
-
2017-03-06T16:14:31.913747+08:00 0 [ERROR] Failed to open the relay log './relay.000117' (relay_log_pos 579901661).
-
2017-03-06T16:14:31.913775+08:00 0 [ERROR] Could not find target log file mentioned in relay log info in the index file './omstest-relay-bin.index' during relay log initialization.
-
2017-03-06T16:14:31.927813+08:00 0 [ERROR] Failed to initialize the master info structure
- 2017-03-06T16:14:31.927836+08:00 0 [ERROR] Failed to create or recover replication info repositories.
-
mysql> reset slave;
- Query OK, 0 rows affected (0.01 sec)
-
change master to
-
master_host='10.30.xxx',
-
master_port=3306,
-
master_user='repl',
-
master_password='REPLsafe!@#$24',
-
master_log_file='mysql-bin.000012',
- master_log_pos=154;
-
mysql> reset slave;
- Query OK, 0 rows affected (0.01 sec)
-
mysql> show slave status \G;
-
*************************** 1. row ***************************
-
Slave_IO_State: Waiting for master to send event
-
Master_Host: 10.30.50.24
-
Master_User: repl
-
Master_Port: 3306
-
Connect_Retry: 60
-
Master_Log_File: mysql-bin.000012
-
Read_Master_Log_Pos: 577
-
Relay_Log_File: omstest-relay-bin.000002
-
Relay_Log_Pos: 743
-
Relay_Master_Log_File: mysql-bin.000012
-
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:
-
Last_Errno: 0
-
Last_Error:
-
Skip_Counter: 0
-
Exec_Master_Log_Pos: 577
-
Relay_Log_Space: 952
-
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: 23306
-
Master_UUID: c34dd0f3-fffa-11e6-a95d-00163e033ba0
-
Master_Info_File: /alidata1/mysqldata/3307/data/master.info
-
SQL_Delay: 0
-
SQL_Remaining_Delay: NULL
-
Slave_SQL_Running_State: Slave has read all relay log; waiting for more updates
-
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
-
Replicate_Rewrite_DB:
-
Channel_Name:
-
Master_TLS_Version:
- 1 row in set (0.00 sec)
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/20893244/viewspace-2134798/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- MYSQL 配置slave故障MySql
- mysql slave 損害一例MySql
- Mysql slave 延遲故障一列MySql
- 故障分析 | MySQL : slave_compressed_protocol 導致 crashMySqlProtocol
- 處理mysql複製故障一例薦MySql
- 故障分析 | MySQL鎖等待超時一例分析MySql
- 處理MySQL複製環境Slave故障的一個案例MySql
- MySQL:5.6 大事務show engine innodb status故障一例MySql
- MySQL:產生大量小relay log的故障一例MySql
- 網路故障一例
- MySQL master/slaveMySqlAST
- MySQL新建SlaveMySql
- 故障分析 | MySQL 耗盡主機記憶體一例分析MySql記憶體
- 故障案例:主從同步報錯Fatal error: The slave I/O thread stops because master and slave have equal MySQL server主從同步ErrorthreadASTMySqlServer
- MySql的Master/SlaveMySqlAST
- 【MySQL】Server-id導致Slave_IO_Running: No主從複製故障MySqlServer
- 故障分析 | MySQL 備份檔案靜默損壞一例分析MySql
- OGG 故障處理一例
- goldengate故障處理一例Go
- mysql slave錯誤skipMySql
- MySQL Master/Slave Master/MasterMySqlAST
- mysql master和slave配置MySqlAST
- mysql slave 轉為 masterMySqlAST
- MySQL 5.5 Master/Slave 配置MySqlAST
- mysql slave-skip-errorsMySqlError
- vmwareworkstation虛擬網路故障一例
- ORA-00054 故障處理一例
- Rownum分頁故障解決一例
- goldengate故障處理一例(續)Go
- database link故障處理一例Database
- "OPatch failed with error code 73"故障一例AIError
- mysql master slave 主從同步MySqlAST主從同步
- mysql 同步 master-slave薦MySqlAST
- Mysql Slave群切換MasterMySqlAST
- Mysql Slave群切換Master (=)MySqlAST
- Slave_SQL_Running:Nomysql同步故障解決方法MySql
- MySQL master and slave have equal MySQL server UUIDsMySqlASTServerUI
- MySQL錯誤之mysql.slave_master_infoMySqlAST