Gen2 Cloud SQL and importing tiggers.

145 views
Skip to first unread message

Tim Turner

unread,
Mar 8, 2017, 9:53:21 PM3/8/17
to Google Cloud SQL discuss

I am getting the ERROR 1227 Access Denied Requires SUPER USER Privileges My application is Magento EE 1x. I have disabled Binary Logging, I have disabled backups altogether, I don't do any replication. I have set the log_bin_trust_function_creators flag to ON And I am still getting the error. Here is an example of my code from my magento backup that I am trying to restore into the google cloud SQL gen2. In this process I have two sql backups the data and the triggers, data restored fine it's the file of all the triggers that won't import. 

USE `dev_magento`;
/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client  = utf8 */ ;
/*!50003 SET character_set_results = utf8 */ ;
/*!50003 SET collation_connection  = utf8_general_ci */ ;
/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
/*!50003 SET sql_mode              = '' */ ;   
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`someuser`@`remote_IP`*/ /*!50003 TRIGGER trg_catalog_category_entity_after_insert
AFTER INSERT
ON catalog_category_entity FOR EACH ROW
BEGIN
INSERT IGNORE INTO `enterprise_url_rewrite_category_cl` (`entity_id`)
VALUES (NEW.`entity_id`);
INSERT IGNORE INTO `catalog_category_product_cat_cl` (`category_id`) VALUES (NEW.`entity_id`);
INSERT IGNORE INTO `catalog_category_flat_cl` (`entity_id`) VALUES (NEW.`entity_id`);

END */;;

Some have posted that importing from the CLI has worked it's unclear if that's using googles tools or mysql? Using the mysql command to import does not work as it results in the same error. 


David Newgas

unread,
Mar 9, 2017, 11:40:20 AM3/9/17
to Google Cloud SQL discuss
Setting DEFINIER requires SUPER privileges.  I believe your import will work if you remove it. The trigger will then run as whichever user was used to create it rather than the one specified.

David

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/10d985c5-4c93-4b63-aed5-5d7e62df5e4d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages