Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The problem of 1781 of BINLOG

2025-06-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Once recover data through BINLOG Times:

ERROR 1781 (HY000): @ @ SESSION.GTID_NEXT cannot be set to UUID:NUMBER when @ @ GLOBAL.GTID_MODE = OFF

Scenario description:

In an erroneous deletion, the BINLOG file is directly imported as a SQL file (mysqlbinlog mysql-bin.000020 > a20.sql), and the data is restored through source, resulting in an error message of 1781.

Question1: the GTID function is not enabled online, so how can the SQL file exported in this way have the information of GTID? It could be.

Solution:

1. Remove GTID from the exported incremental log

Sed-I 's/SET @ @ SESSION.GTID_NEXT/#SET @ @ SESSION.GTID_NEXT/g' aa.sql

2. Executing SET @ @ GLOBAL.GTID_MODE = OFF_PERMISSIVE before version 5.7 cannot be executed. Prompt static parameters. 5.7. even if you are already looking at OFF, you will report an error before you do not execute the parameters.

3. If you specify-- skip-gtids=true when parsing the binlog log using mysqlbinlog, the parsed file will not contain SET @ @ SESSION.GTID_NEXT=

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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report