Reputation: 480
My Magento version is 2.2.3. We are using a Google Cloud SQL 2nd gen instance.
Facing error while run indexing command
General error: 1787 Statement violates GTID consistency: CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can only be executed outside transactional context. These statements are also not allowed in a function or trigger because functions and triggers are also considered to be multi-statement transactions., query was: CREATE TEMPORARY TABLE IF NOT EXISTS
catalog_product_index_eav_temp
LIKEcatalog_product_index_eav_tmp
Upvotes: 3
Views: 5919
Reputation: 607
Following the issues posted in Magento 2 Issue Tracker, I was able to get rid of this error by disabling binary logging with the following command:
gcloud sql instances patch [INSTANCE_NAME] --no-enable-bin-log
You can also disable binary logging from the web console while creating a Cloud SQL instance:
1. Expand "Show Configuration Options"
2. Expand "Enable auto backups and high availability"
3. Uncheck "Enable binary logging"
This means that you cannot currently implement a high availability MySQL instance (with Google Cloud SQL) using Magento 2 community edition.
You can track the status of issue 12124 for updates.
Upvotes: 5