且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

拒绝访问;您需要(至少其中一种)SUPER权限才能执行此操作

更新时间:2021-08-28 15:57:13

从您的sqldump文件中删除DEFINER=..语句,或将用户值替换为CURRENT_USER.

Either remove the DEFINER=.. statement from your sqldump file, or replace the user values with CURRENT_USER.

根据我的经验,RDS提供的MySQL服务器不允许其他用户使用DEFINER语法.

The MySQL server provided by RDS does not allow a DEFINER syntax for another user (in my experience).

您可以使用sed脚本将其从文件中删除:

You can use a sed script to remove them from the file:

sed 's/\sDEFINER=`[^`]*`@`[^`]*`//g' -i oldfile.sql