Resolving MySQL Manual Backup Errors Caused by Incorrect gtid_mode Setting
During routine MySQL maintenance a manual backup failed because the server could not parse the last GTID from the backup log, which was traced to an incorrect gtid_mode value (OFF_PERMISSIVE) and resolved by setting gtid_mode to ON and restarting the instance.
In a routine operation a client‑initiated manual backup of a MySQL instance failed with the error "manual backup error: rpc error: code = Unknown desc = task(...) is failed, reason is parse last gtid from file ... failed", indicating that the server could not read the last GTID from the backup log.
Investigation showed that the GTID parsing error stemmed from the gtid_mode system variable being set to OFF_PERMISSIVE. MySQL defines four possible values for gtid_mode: OFF, OFF_PERMISSIVE, ON_PERMISSIVE, and ON. The current configuration prevented the replica from starting in AUTO_POSITION mode and also blocked backups.
Local tests were performed by editing the MySQL configuration file. Setting gtid_mode=1 (which maps to OFF_PERMISSIVE) and restarting the server left the variable unchanged, while setting gtid_mode=ON (numeric value 3) correctly changed the mode to ON. The following commands illustrate the checks and changes:
mysql> show variables like "gtid_mode";
+---------------+----------------+
| Variable_name | Value |
+---------------+----------------+
| gtid_mode | OFF_PERMISSIVE |
+---------------+----------------+
mysql> set global gtid_mode=0; -- sets OFF
mysql> set global gtid_mode=1; -- sets OFF_PERMISSIVE
mysql> set global gtid_mode=2; -- sets ON_PERMISSIVE
mysql> set global gtid_mode=3; -- sets ONAfter updating the configuration file to use gtid_mode=ON (or gtid_mode=3) and restarting the instance, the manual backup succeeded and replication could start in AUTO_POSITION mode.
The key takeaway is that in daily operations the numeric shortcut gtid_mode=1 does not correspond to ON; it actually sets the mode to OFF_PERMISSIVE. Therefore, administrators must explicitly set gtid_mode=ON or use the numeric value 3 to enable GTID‑based replication and backup.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Aikesheng Open Source Community
The Aikesheng Open Source Community provides stable, enterprise‑grade MySQL open‑source tools and services, releases a premium open‑source component each year (1024), and continuously operates and maintains them.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
