MySQL Common error resolution

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.