Answer customer question! |
When importing a MySQL dump, the following error occurs:
ERROR 1227 (42000) at line 7692: Access denied; you need (at least one of) the SUPER privilege(s) for this operation. |
AWS RDS does not allow the creation of functions and stored procedures by default. In addition, there may be problems with DEFINER statements in the SQL dump.
Root360 can use a support ticket to enable the use of SQL functions, views, and stored procedures. For this purpose, the following value must be set in the RDS parameter group:
log_bin_trust_function_creators = 1 |
If DEFINER statements with fixed SQL users are specified in the SQL dump, they must be replaced with the user that is doing the import.
DEFINER = user_a @all
or
DEFINER=user_a@localhost
DEFINER=`correctuser`@`%`
To replace all DEFINER statements, the following sed command can be used on the NATGW:
sed -i "s/DEFINER=\`[^\`]*\`@\`[^\`]*\`/DEFINER=\`USERNAME\`@\`%\`/g" CustomerSQLDump.sql |
Pick one level and also add as tag to page
EXPERT