Troubleshoot MySQL using binary logs to recover data error: Error 1781 (HY000) at line: @ @SESSION. Gtid_next cannot is set to Uuid:number when @ @GLOBAL. Gtid_mode = OFF.
Workaround:
Configure Gtid Options
Before configuration:
Mysql> show global variables like ' gtid_mode ';
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect ...
Connection id:24
Current Database:gold
+---------------+-------+
| variable_name | Value |
+---------------+-------+
| Gtid_mode | OFF |
+---------------+-------+
1 row in Set (0.10 sec)
After configuration:
Mysql> SET @ @GLOBAL. Gtid_mode = off_permissive;
Mysql> show global variables like ' gtid_mode ';
+---------------+----------------+
| variable_name | Value |
+---------------+----------------+
| Gtid_mode | off_permissive |
+---------------+----------------+
1 row in Set (0.00 sec)
Resolve Error 1062 (23000): Duplicate entry ' 4 ' for key ' PRIMARY '
Before configuration:
Solve:
MySQL Modify primary key self-growth
ALTER TABLE test change ID ID int auto_increment;
Ok,mysql will also be added to the problems encountered in the future.
MySQL Common error resolution