Magento 2.2 : MySQL General error 1787 when reindexing












0















How to fix the two errors below ?



$ php bin/magento indexer:reindex
Design Config Grid index has been rebuilt successfully in 00:00:00
Customer Grid index is locked by another reindex process. Skipping.
Category Products index has been rebuilt successfully in 00:00:00
Product Categories index has been rebuilt successfully in 00:00:00
Product Price index has been rebuilt successfully in 00:00:00
SQLSTATE[HY000]: General error: 1787 When @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1, the statements CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can be executed in a non-transactional context only, and require that AUTOCOMMIT = 1., query was: CREATE TEMPORARY TABLE IF NOT EXISTS `catalog_product_index_eav_temp` LIKE `catalog_product_index_eav_tmp`
Stock index has been rebuilt successfully in 00:00:00
Catalog Rule Product index has been rebuilt successfully in 00:00:00
Catalog Product Rule index has been rebuilt successfully in 00:00:00
Catalog Search index has been rebuilt successfully in 00:00:04


My server in on Ubuntu 16.04 with Mysql 5.7.19 and php 7.0.24.










share|improve this question
















bumped to the homepage by Community 12 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • What is your MySQL version ? What returns the mysql query : "SELECT @@GLOBAL.ENFORCE_GTID_CONSISTENCY;" ?

    – Nicolas PERNOT
    Oct 24 '17 at 8:06











  • I'm using "mysql Ver 14.14 Distrib 5.7.19, for Linux (x86_64) using EditLine wrapper". The query returns "1".

    – maxagaz
    Oct 24 '17 at 8:25
















0















How to fix the two errors below ?



$ php bin/magento indexer:reindex
Design Config Grid index has been rebuilt successfully in 00:00:00
Customer Grid index is locked by another reindex process. Skipping.
Category Products index has been rebuilt successfully in 00:00:00
Product Categories index has been rebuilt successfully in 00:00:00
Product Price index has been rebuilt successfully in 00:00:00
SQLSTATE[HY000]: General error: 1787 When @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1, the statements CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can be executed in a non-transactional context only, and require that AUTOCOMMIT = 1., query was: CREATE TEMPORARY TABLE IF NOT EXISTS `catalog_product_index_eav_temp` LIKE `catalog_product_index_eav_tmp`
Stock index has been rebuilt successfully in 00:00:00
Catalog Rule Product index has been rebuilt successfully in 00:00:00
Catalog Product Rule index has been rebuilt successfully in 00:00:00
Catalog Search index has been rebuilt successfully in 00:00:04


My server in on Ubuntu 16.04 with Mysql 5.7.19 and php 7.0.24.










share|improve this question
















bumped to the homepage by Community 12 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • What is your MySQL version ? What returns the mysql query : "SELECT @@GLOBAL.ENFORCE_GTID_CONSISTENCY;" ?

    – Nicolas PERNOT
    Oct 24 '17 at 8:06











  • I'm using "mysql Ver 14.14 Distrib 5.7.19, for Linux (x86_64) using EditLine wrapper". The query returns "1".

    – maxagaz
    Oct 24 '17 at 8:25














0












0








0


0






How to fix the two errors below ?



$ php bin/magento indexer:reindex
Design Config Grid index has been rebuilt successfully in 00:00:00
Customer Grid index is locked by another reindex process. Skipping.
Category Products index has been rebuilt successfully in 00:00:00
Product Categories index has been rebuilt successfully in 00:00:00
Product Price index has been rebuilt successfully in 00:00:00
SQLSTATE[HY000]: General error: 1787 When @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1, the statements CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can be executed in a non-transactional context only, and require that AUTOCOMMIT = 1., query was: CREATE TEMPORARY TABLE IF NOT EXISTS `catalog_product_index_eav_temp` LIKE `catalog_product_index_eav_tmp`
Stock index has been rebuilt successfully in 00:00:00
Catalog Rule Product index has been rebuilt successfully in 00:00:00
Catalog Product Rule index has been rebuilt successfully in 00:00:00
Catalog Search index has been rebuilt successfully in 00:00:04


My server in on Ubuntu 16.04 with Mysql 5.7.19 and php 7.0.24.










share|improve this question
















How to fix the two errors below ?



$ php bin/magento indexer:reindex
Design Config Grid index has been rebuilt successfully in 00:00:00
Customer Grid index is locked by another reindex process. Skipping.
Category Products index has been rebuilt successfully in 00:00:00
Product Categories index has been rebuilt successfully in 00:00:00
Product Price index has been rebuilt successfully in 00:00:00
SQLSTATE[HY000]: General error: 1787 When @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1, the statements CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can be executed in a non-transactional context only, and require that AUTOCOMMIT = 1., query was: CREATE TEMPORARY TABLE IF NOT EXISTS `catalog_product_index_eav_temp` LIKE `catalog_product_index_eav_tmp`
Stock index has been rebuilt successfully in 00:00:00
Catalog Rule Product index has been rebuilt successfully in 00:00:00
Catalog Product Rule index has been rebuilt successfully in 00:00:00
Catalog Search index has been rebuilt successfully in 00:00:04


My server in on Ubuntu 16.04 with Mysql 5.7.19 and php 7.0.24.







database magento2.2






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 26 '17 at 15:51







maxagaz

















asked Oct 24 '17 at 7:52









maxagazmaxagaz

421425




421425





bumped to the homepage by Community 12 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 12 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • What is your MySQL version ? What returns the mysql query : "SELECT @@GLOBAL.ENFORCE_GTID_CONSISTENCY;" ?

    – Nicolas PERNOT
    Oct 24 '17 at 8:06











  • I'm using "mysql Ver 14.14 Distrib 5.7.19, for Linux (x86_64) using EditLine wrapper". The query returns "1".

    – maxagaz
    Oct 24 '17 at 8:25



















  • What is your MySQL version ? What returns the mysql query : "SELECT @@GLOBAL.ENFORCE_GTID_CONSISTENCY;" ?

    – Nicolas PERNOT
    Oct 24 '17 at 8:06











  • I'm using "mysql Ver 14.14 Distrib 5.7.19, for Linux (x86_64) using EditLine wrapper". The query returns "1".

    – maxagaz
    Oct 24 '17 at 8:25

















What is your MySQL version ? What returns the mysql query : "SELECT @@GLOBAL.ENFORCE_GTID_CONSISTENCY;" ?

– Nicolas PERNOT
Oct 24 '17 at 8:06





What is your MySQL version ? What returns the mysql query : "SELECT @@GLOBAL.ENFORCE_GTID_CONSISTENCY;" ?

– Nicolas PERNOT
Oct 24 '17 at 8:06













I'm using "mysql Ver 14.14 Distrib 5.7.19, for Linux (x86_64) using EditLine wrapper". The query returns "1".

– maxagaz
Oct 24 '17 at 8:25





I'm using "mysql Ver 14.14 Distrib 5.7.19, for Linux (x86_64) using EditLine wrapper". The query returns "1".

– maxagaz
Oct 24 '17 at 8:25










2 Answers
2






active

oldest

votes


















0














Magento try to create a temporary table, but like you have ENFORCE_GTID_CONSISTENCY enable that failed.




Only statements that can be logged using GTID safe statements can be logged when enforce-gtid-consistency is set to ON, so the operations listed here cannot be used with this option:




  • CREATE TABLE ... SELECT statements

  • CREATE TEMPORARY TABLE or DROP TEMPORARY TABLE statements inside transactions

  • Transactions or statements that update both transactional and nontransactional tables. There is an exception that nontransactional DML is allowed in the same transaction or in the same statement as transactional DML, if all nontransactional tables are temporary.




https://dev.mysql.com/doc/refman/5.7/en/replication-options-gtids.html



I don't know if Magento 2 is able to work with GTID Consistency enable (seems not). If it's not a strong need, you can deactivate it.






share|improve this answer
























  • How to disable it ?

    – maxagaz
    Oct 26 '17 at 15:22











  • Depends... Try to look for it in your my.cnf. You can have something like "enforce_gtid_consistency=true". Switch it to false and restart MySQL. Check if the modification is effective thanks to the query following: "SELECT @@GLOBAL.ENFORCE_GTID_CONSISTENCY;"

    – Nicolas PERNOT
    Oct 27 '17 at 9:47











  • It is possible there are other configuration lines in you my.cnf about gtid, like gtid_mode (if it is, switch it to OFF). Don't forget to restart MySQL after a modification of my.cnf.

    – Nicolas PERNOT
    Oct 27 '17 at 9:48













  • Actually, I can't switch off GTID on the RDS server I'm using, is there another way to clean the database from GTID stuffs ?

    – maxagaz
    Oct 27 '17 at 10:51











  • You can set values through MySQL. But if configurations are in my.cnf, these values will be reinitialized each time MySQL will restart. So its not a good way to do, but that let you test if the solution works. "SET @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1000;". Maybe a dump of the database before could be a good idea ;)

    – Nicolas PERNOT
    Oct 27 '17 at 13:20



















0














Problem fixed by this module:
https://github.com/bangerkuwranger/Magento-2-GTID-Safe-URL-Rewrite-Tables






share|improve this answer
























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "479"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f198330%2fmagento-2-2-mysql-general-error-1787-when-reindexing%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Magento try to create a temporary table, but like you have ENFORCE_GTID_CONSISTENCY enable that failed.




    Only statements that can be logged using GTID safe statements can be logged when enforce-gtid-consistency is set to ON, so the operations listed here cannot be used with this option:




    • CREATE TABLE ... SELECT statements

    • CREATE TEMPORARY TABLE or DROP TEMPORARY TABLE statements inside transactions

    • Transactions or statements that update both transactional and nontransactional tables. There is an exception that nontransactional DML is allowed in the same transaction or in the same statement as transactional DML, if all nontransactional tables are temporary.




    https://dev.mysql.com/doc/refman/5.7/en/replication-options-gtids.html



    I don't know if Magento 2 is able to work with GTID Consistency enable (seems not). If it's not a strong need, you can deactivate it.






    share|improve this answer
























    • How to disable it ?

      – maxagaz
      Oct 26 '17 at 15:22











    • Depends... Try to look for it in your my.cnf. You can have something like "enforce_gtid_consistency=true". Switch it to false and restart MySQL. Check if the modification is effective thanks to the query following: "SELECT @@GLOBAL.ENFORCE_GTID_CONSISTENCY;"

      – Nicolas PERNOT
      Oct 27 '17 at 9:47











    • It is possible there are other configuration lines in you my.cnf about gtid, like gtid_mode (if it is, switch it to OFF). Don't forget to restart MySQL after a modification of my.cnf.

      – Nicolas PERNOT
      Oct 27 '17 at 9:48













    • Actually, I can't switch off GTID on the RDS server I'm using, is there another way to clean the database from GTID stuffs ?

      – maxagaz
      Oct 27 '17 at 10:51











    • You can set values through MySQL. But if configurations are in my.cnf, these values will be reinitialized each time MySQL will restart. So its not a good way to do, but that let you test if the solution works. "SET @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1000;". Maybe a dump of the database before could be a good idea ;)

      – Nicolas PERNOT
      Oct 27 '17 at 13:20
















    0














    Magento try to create a temporary table, but like you have ENFORCE_GTID_CONSISTENCY enable that failed.




    Only statements that can be logged using GTID safe statements can be logged when enforce-gtid-consistency is set to ON, so the operations listed here cannot be used with this option:




    • CREATE TABLE ... SELECT statements

    • CREATE TEMPORARY TABLE or DROP TEMPORARY TABLE statements inside transactions

    • Transactions or statements that update both transactional and nontransactional tables. There is an exception that nontransactional DML is allowed in the same transaction or in the same statement as transactional DML, if all nontransactional tables are temporary.




    https://dev.mysql.com/doc/refman/5.7/en/replication-options-gtids.html



    I don't know if Magento 2 is able to work with GTID Consistency enable (seems not). If it's not a strong need, you can deactivate it.






    share|improve this answer
























    • How to disable it ?

      – maxagaz
      Oct 26 '17 at 15:22











    • Depends... Try to look for it in your my.cnf. You can have something like "enforce_gtid_consistency=true". Switch it to false and restart MySQL. Check if the modification is effective thanks to the query following: "SELECT @@GLOBAL.ENFORCE_GTID_CONSISTENCY;"

      – Nicolas PERNOT
      Oct 27 '17 at 9:47











    • It is possible there are other configuration lines in you my.cnf about gtid, like gtid_mode (if it is, switch it to OFF). Don't forget to restart MySQL after a modification of my.cnf.

      – Nicolas PERNOT
      Oct 27 '17 at 9:48













    • Actually, I can't switch off GTID on the RDS server I'm using, is there another way to clean the database from GTID stuffs ?

      – maxagaz
      Oct 27 '17 at 10:51











    • You can set values through MySQL. But if configurations are in my.cnf, these values will be reinitialized each time MySQL will restart. So its not a good way to do, but that let you test if the solution works. "SET @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1000;". Maybe a dump of the database before could be a good idea ;)

      – Nicolas PERNOT
      Oct 27 '17 at 13:20














    0












    0








    0







    Magento try to create a temporary table, but like you have ENFORCE_GTID_CONSISTENCY enable that failed.




    Only statements that can be logged using GTID safe statements can be logged when enforce-gtid-consistency is set to ON, so the operations listed here cannot be used with this option:




    • CREATE TABLE ... SELECT statements

    • CREATE TEMPORARY TABLE or DROP TEMPORARY TABLE statements inside transactions

    • Transactions or statements that update both transactional and nontransactional tables. There is an exception that nontransactional DML is allowed in the same transaction or in the same statement as transactional DML, if all nontransactional tables are temporary.




    https://dev.mysql.com/doc/refman/5.7/en/replication-options-gtids.html



    I don't know if Magento 2 is able to work with GTID Consistency enable (seems not). If it's not a strong need, you can deactivate it.






    share|improve this answer













    Magento try to create a temporary table, but like you have ENFORCE_GTID_CONSISTENCY enable that failed.




    Only statements that can be logged using GTID safe statements can be logged when enforce-gtid-consistency is set to ON, so the operations listed here cannot be used with this option:




    • CREATE TABLE ... SELECT statements

    • CREATE TEMPORARY TABLE or DROP TEMPORARY TABLE statements inside transactions

    • Transactions or statements that update both transactional and nontransactional tables. There is an exception that nontransactional DML is allowed in the same transaction or in the same statement as transactional DML, if all nontransactional tables are temporary.




    https://dev.mysql.com/doc/refman/5.7/en/replication-options-gtids.html



    I don't know if Magento 2 is able to work with GTID Consistency enable (seems not). If it's not a strong need, you can deactivate it.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Oct 24 '17 at 8:44









    Nicolas PERNOTNicolas PERNOT

    392212




    392212













    • How to disable it ?

      – maxagaz
      Oct 26 '17 at 15:22











    • Depends... Try to look for it in your my.cnf. You can have something like "enforce_gtid_consistency=true". Switch it to false and restart MySQL. Check if the modification is effective thanks to the query following: "SELECT @@GLOBAL.ENFORCE_GTID_CONSISTENCY;"

      – Nicolas PERNOT
      Oct 27 '17 at 9:47











    • It is possible there are other configuration lines in you my.cnf about gtid, like gtid_mode (if it is, switch it to OFF). Don't forget to restart MySQL after a modification of my.cnf.

      – Nicolas PERNOT
      Oct 27 '17 at 9:48













    • Actually, I can't switch off GTID on the RDS server I'm using, is there another way to clean the database from GTID stuffs ?

      – maxagaz
      Oct 27 '17 at 10:51











    • You can set values through MySQL. But if configurations are in my.cnf, these values will be reinitialized each time MySQL will restart. So its not a good way to do, but that let you test if the solution works. "SET @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1000;". Maybe a dump of the database before could be a good idea ;)

      – Nicolas PERNOT
      Oct 27 '17 at 13:20



















    • How to disable it ?

      – maxagaz
      Oct 26 '17 at 15:22











    • Depends... Try to look for it in your my.cnf. You can have something like "enforce_gtid_consistency=true". Switch it to false and restart MySQL. Check if the modification is effective thanks to the query following: "SELECT @@GLOBAL.ENFORCE_GTID_CONSISTENCY;"

      – Nicolas PERNOT
      Oct 27 '17 at 9:47











    • It is possible there are other configuration lines in you my.cnf about gtid, like gtid_mode (if it is, switch it to OFF). Don't forget to restart MySQL after a modification of my.cnf.

      – Nicolas PERNOT
      Oct 27 '17 at 9:48













    • Actually, I can't switch off GTID on the RDS server I'm using, is there another way to clean the database from GTID stuffs ?

      – maxagaz
      Oct 27 '17 at 10:51











    • You can set values through MySQL. But if configurations are in my.cnf, these values will be reinitialized each time MySQL will restart. So its not a good way to do, but that let you test if the solution works. "SET @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1000;". Maybe a dump of the database before could be a good idea ;)

      – Nicolas PERNOT
      Oct 27 '17 at 13:20

















    How to disable it ?

    – maxagaz
    Oct 26 '17 at 15:22





    How to disable it ?

    – maxagaz
    Oct 26 '17 at 15:22













    Depends... Try to look for it in your my.cnf. You can have something like "enforce_gtid_consistency=true". Switch it to false and restart MySQL. Check if the modification is effective thanks to the query following: "SELECT @@GLOBAL.ENFORCE_GTID_CONSISTENCY;"

    – Nicolas PERNOT
    Oct 27 '17 at 9:47





    Depends... Try to look for it in your my.cnf. You can have something like "enforce_gtid_consistency=true". Switch it to false and restart MySQL. Check if the modification is effective thanks to the query following: "SELECT @@GLOBAL.ENFORCE_GTID_CONSISTENCY;"

    – Nicolas PERNOT
    Oct 27 '17 at 9:47













    It is possible there are other configuration lines in you my.cnf about gtid, like gtid_mode (if it is, switch it to OFF). Don't forget to restart MySQL after a modification of my.cnf.

    – Nicolas PERNOT
    Oct 27 '17 at 9:48







    It is possible there are other configuration lines in you my.cnf about gtid, like gtid_mode (if it is, switch it to OFF). Don't forget to restart MySQL after a modification of my.cnf.

    – Nicolas PERNOT
    Oct 27 '17 at 9:48















    Actually, I can't switch off GTID on the RDS server I'm using, is there another way to clean the database from GTID stuffs ?

    – maxagaz
    Oct 27 '17 at 10:51





    Actually, I can't switch off GTID on the RDS server I'm using, is there another way to clean the database from GTID stuffs ?

    – maxagaz
    Oct 27 '17 at 10:51













    You can set values through MySQL. But if configurations are in my.cnf, these values will be reinitialized each time MySQL will restart. So its not a good way to do, but that let you test if the solution works. "SET @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1000;". Maybe a dump of the database before could be a good idea ;)

    – Nicolas PERNOT
    Oct 27 '17 at 13:20





    You can set values through MySQL. But if configurations are in my.cnf, these values will be reinitialized each time MySQL will restart. So its not a good way to do, but that let you test if the solution works. "SET @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1000;". Maybe a dump of the database before could be a good idea ;)

    – Nicolas PERNOT
    Oct 27 '17 at 13:20













    0














    Problem fixed by this module:
    https://github.com/bangerkuwranger/Magento-2-GTID-Safe-URL-Rewrite-Tables






    share|improve this answer




























      0














      Problem fixed by this module:
      https://github.com/bangerkuwranger/Magento-2-GTID-Safe-URL-Rewrite-Tables






      share|improve this answer


























        0












        0








        0







        Problem fixed by this module:
        https://github.com/bangerkuwranger/Magento-2-GTID-Safe-URL-Rewrite-Tables






        share|improve this answer













        Problem fixed by this module:
        https://github.com/bangerkuwranger/Magento-2-GTID-Safe-URL-Rewrite-Tables







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 13 '17 at 15:13









        maxagazmaxagaz

        421425




        421425






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Magento Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f198330%2fmagento-2-2-mysql-general-error-1787-when-reindexing%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            What other Star Trek series did the main TNG cast show up in?

            Berlina muro

            Berlina aerponto