国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數據庫 > MySQL > 正文

MySQL GTID復制中斷修復步驟

2024-07-24 12:32:07
字體:
來源:轉載
供稿:網友
      slave中出現錯誤:
 
      2020-04-09T07:40:18.719203Z 16 [ERROR] Slave SQL for channel '': Could not execute Write_rows event on table mytestdb.t1; Duplicate entry '6' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log mysql-bin.000050, end_log_pos 437, Error_code: 1062
 
      2020-04-09T07:40:18.719237Z 16 [Warning] Slave: Duplicate entry '6' for key 'PRIMARY' Error_code: 1062
 
      2020-04-09T07:40:18.719246Z 16 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'mysql-bin.000050' position 194.
 
      這是由于我人為往表中制造了主鍵沖突
 
| gtid_executed_compression_period | 1000                                                                                  |
 
| gtid_mode                        | ON                                                                                    |
 
| gtid_owned                       |                                                                                       |
 
| gtid_purged                      | 2ff0b1ed-5dc8-11ea-9878-000c29872e9a:1-2                                              |
 
| session_track_gtids              | OFF                                                                                   |
 
+----------------------------------+---------------------------------------------------------------------------------------+
 
查看master的gtid信息:
 
root@dv 15:40:  : [(none)]>show global variables like '%gtid%';
 
+----------------------------------+---------------------------------------------+
 
| Variable_name                    | Value                                       |
 
+----------------------------------+---------------------------------------------+
 
| binlog_gtid_simple_recovery      | ON                                          |
 
| enforce_gtid_consistency         | ON                                          |
 
| gtid_executed                    | 2ff0b1ed-5dc8-11ea-9878-000c29872e9a:1-6958 |
 
| gtid_executed_compression_period | 1000                                        |
 
| gtid_mode                        | ON                                          |
 
| gtid_owned                       |                                             |
 
| gtid_purged                      | 2ff0b1ed-5dc8-11ea-9878-000c29872e9a:1-2    |
 
| session_track_gtids              | OFF                                         |
 
+----------------------------------+---------------------------------------------+
 
設置從庫的gtid_next
 
mysql> SET GTID_NEXT="2ff0b1ed-5dc8-11ea-9878-000c29872e9a:1-6957";
 
ERROR 1774 (HY000): Malformed GTID specification '2ff0b1ed-5dc8-11ea-9878-000c29872e9a:1-6958'.
 
mysql> SET GTID_NEXT="2ff0b1ed-5dc8-11ea-9878-000c29872e9a:6957";
 
Query OK, 0 rows affected (0.00 sec)
 
緊接著start slave即可

(編輯:武林網)

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 日喀则市| 阜城县| 容城县| 麻栗坡县| 华蓥市| 图木舒克市| 瑞丽市| 景泰县| 高要市| 岚皋县| 扶绥县| 綦江县| 河西区| 丹阳市| 阿拉善右旗| 新野县| 上虞市| 洪江市| 苍南县| 八宿县| 岳西县| 资中县| 扬中市| 高淳县| 灵山县| 甘谷县| 毕节市| 广汉市| 赣州市| 清新县| 宝兴县| 汝州市| 上高县| 闸北区| 乳源| 洮南市| 湄潭县| 濮阳县| 永泰县| 安阳县| 贵定县|