In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
An error occurred in 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.
This is because I artificially created primary key conflicts in the table.
View the gtid information of slave:
Mysql > 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-6957 |
3853efe2-5dc8-11ea-86cb-000c295618b3:1-2 |
| | gtid_executed_compression_period | 1000 | |
| | gtid_mode | ON |
| | gtid_owned |
| | gtid_purged | 2ff0b1ed-5dc8-11ea-9878-000c29872e9a:1-2 | |
| | session_track_gtids | OFF |
+-+ +
View the gtid information of master:
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 |
+-+ +
Set the gtid_next of the slave library
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)
Mysql >
Mysql > begin
Query OK, 0 rows affected (0.00 sec)
Mysql > commit
Query OK, 0 rows affected (0.00 sec)
Here is to simulate a transaction instead of the one that went wrong
Mysql > SET GTID_NEXT= "AUTOMATIC"
->
Query OK, 0 rows affected (0.00 sec)
Just follow start slave.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.