MySQL Error 1786 (HY000) case

Source: Internet
Author: User

1.1.1. ERROR 1786 (HY000)

"Environment description"

msyql5.6.14

"Error Message"

Executing the CREATE TABLE ... an error was encountered while select:

DB1 [Test] [23:01:58]> Create Tablelgmnr_bak select * from LGMNR;

ERROR 1786 (HY000): CREATE TABLE ... Selectis Forbidden when @ @GLOBAL. Enforce_gtid_consistency = 1

"Cause of the error"

ERROR1786 is due to the opening of the Enforce_gtid_consistency=true function, MySQL official explained that when the Enforce_gtid_consistency feature is enabled, MySQL only allows security of the transaction, and the SQL statements that can be logged are executed, like CREATE TABLE ... select and create temporarytable statements, and SQL statements or transactions that update both transaction and non-transactional tables are not allowed to execute.

DB1 [test] [23:28:28]> show variableslike ' enforce_gtid_consistency ';

+--------------------------+-------+

| variable_name | Value |

+--------------------------+-------+

| enforce_gtid_consistency | On |

+--------------------------+-------+

"Workaround"

Because the enforce_gtid_consistency parameter is read-only, the MySQL service must be restarted to be configured to take effect.

Error when attempting to dynamically modify online:

DB1 [Test] [23:37:56]> set globalenforce_gtid_consistency=true;

ERROR 1238 (HY000): Variable ' enforce_gtid_consistency ' is a-read only Variable

This column more highlights: http://www.bianceng.cn/database/MySQL/

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.