简体   繁体   中英

Mysql Dump to Maria DB on AWS

I am trying to perform a mysql dump to a Maria DB instance on Amazon RDS however I encountered the following error

ERROR 1419 (HY000) at line 893: You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)

Here is the contents of line 893

/*!50003 CREATE*/  /*!50003 TRIGGER `cart_insert` AFTER INSERT ON `order` FOR EACH ROW BEGIN

I saw a similar error on another post where it mentions to remove the DEFINER text. This is line 893 prior to removing the DEFINER text

/*!50003 CREATE*/ /*!50017 DEFINER=`user`@`%`*/ /*!50003 TRIGGER `cart_insert` AFTER INSERT ON `order` FOR EACH ROW BEGIN

The sed command I used to remove the definer text is as follows

sed -i 's/\/\*!50017 DEFINER=[^ ]*`\*\///' /tmp/db_dump.sql

我发现以下帖子并将log_bin_trust_function_creators的值更新为1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM