更新时间:2021-12-23 21:56:31
从 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