GTID複製報錯處理:Last_Error: Error 'Can't drop database 'test';
Mysql GTID複製報錯處理:Last_Error: Error 'Can't drop database 'test'; database doesn't
報錯顯示:
Slave_IO_Running: Yes Slave_SQL_Running: No Last_Error: Error 'Can't drop database 'test'; database doesn't exist' on query. Default database: 'test'. Query: 'drop database test' Retrieved_Gtid_Set: 988b8684-3e21-22e6-a801-24505689c77d:1-9 Executed_Gtid_Set: 檢視主庫上的binlog日誌,查詢drop database test相關的日誌: # at 151 #160630 1:55:19 server id 623306 end_log_pos 199 CRC32 0x5954bb4c GTID [commit=yes] SET @@SESSION.GTID_NEXT= '988b8684-3e21-22e6-a801-24505689c77d:1'/*!*/; # at 199 #160630 1:55:19 server id 623306 end_log_pos 284 CRC32 0x6db10369 Query thread_id=1 exec_time=0 error_code=0 SET TIMESTAMP=1467222919/*!*/; SET @@session.pseudo_thread_id=1/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; SET @@session.sql_mode=1073741824/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C utf8 *//*!*/; SET @@session.character_set_client=83,@@session.collation_connection=83,@@session.collation_server=83/*!*/; SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; drop database test /*!*/; 問題找到了,drop database test對應的事務號是1,接下來就簡單了,按如下操作執行: mysql> stop slave; Query OK, 0 rows affected (0.00 sec) mysql> set gtid_next="988b8684-3e21-22e6-a801-24505689c77d:1"; Query OK, 0 rows affected (0.00 sec) mysql> begin;commit; Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) mysql> set gtid_next="AUTOMATIC"; Query OK, 0 rows affected (0.00 sec) mysql> start slave; Query OK, 0 rows affected (0.00 sec) 檢視結果:
mysql> show slave status\G Slave_IO_Running: Yes Slave_SQL_Running: Yes Retrieved_Gtid_Set: 988b8684-3e21-22e6-a801-24505689c77d:1-9 Executed_Gtid_Set: 988b8684-3e21-22e6-a801-24505689c77d:1-9
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/70000068/viewspace-2772498/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 專案02(Mysql gtid複製故障處理01)MySql
- 網站報錯:“Database Server Error”網站DatabaseServerError
- ogg複製程式報ORA-01438錯誤處理
- eslint --fix 報錯 can't not find modulesEsLint
- MySQL報錯Table 'plugin' is read only [ERROR] Can't open the mysql.plugin table.MySqlPluginError
- MySQL GTID複製錯誤修復演示MySql
- MySQL主從複製之GTID複製MySql
- MySQL 8 複製(四)——GTID與複製MySql
- MySQL 8 複製(五)——配置GTID複製MySql
- Python報錯:UnicodeDecodeError: 'gbk' codec can't decode byte ...PythonUnicodeError
- MYSQL報1022錯誤:Can't write;duplicate key in table '.....'MySql
- 15-錯誤處理(Error)Error
- 16.1.3 使用GTID 配置複製
- MySQL 5.6複製報錯Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND;MySqlError
- mysql多源複製跳過錯誤處理方法MySql
- Error:Can't connect to SOCKS proxy:Connection refused (Connection refused)Error
- 錯誤處理:如何通過 error、deferred、panic 等處理錯誤?Error
- 記一次報錯 symlink(): Protocol error 問題處理ProtocolError
- Fatal error: can't check configuration file '/home/watt/proxy/dError
- 解決ERROR 1231 (42000): Variable 'time_zone' can'tError
- 小程式真機報錯errMsg: “hideLoading:fail:toast can‘t be found“ ?IDEAIAST
- 如何處理WordPress網站提示“建立資料庫連線時出錯”或“Error establishing a database connection”錯誤網站資料庫ErrorDatabase
- 【ERROR】ORA-8103錯誤分析處理Error
- linux下連線mysql報錯ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket ‘/var/lib/mysqLinuxMySqlErrorServer
- Mysql基於GTID的複製模式MySql模式
- Mysql 基於GTID主從複製MySql
- Redis4.0從庫複製報錯"master_link_status:down"處理一例RedisAST
- 小白:關於處理“can't find '__main__' module in ”這個問題的詳細處理方式!AI
- ERROR 1840 (HY000) at line 24: @@GLOBAL.GTID_PURGED can only be set when @@GLOBAError
- 線上將傳統模式複製改為GTID複製模式模式
- MySQL 傳統複製與 GTID 複製原理及操作詳解MySql
- Golang 學習——error 錯誤處理淺談GolangError
- MySQL主從複製報錯:Got fatal error 1236 from master when reading data fromMySqlGoErrorAST
- 完美解決stack Error: Can‘t find Python executable “python“, you can set the PYTHON env variable.ErrorPython
- python在用pandas對csv檔案處理的時候報UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xb6。。。的錯誤PythonUnicodeError
- Camunda 流程執行錯誤處理ERROR BOUNDARY EVENTError
- MySQL 5.7基於GTID的主從複製MySql
- MySQL 5.7 基於GTID搭建主從複製MySql