MySQL ERROR Access denied you need SUPER privilege for this operation

WHen restoring a MySQL database, i get following error

I opened the file in vim editor. On checking line 4382, i found following

This is because some stored procedures use old database user as definer. To fix you need to find and replace all entry for old username with new username.

In vim, i can run

Or delete the DEFINER line from SQL file.

Now restore BACKUP_FILE-modified.sql with

Add a Comment

Your email address will not be published. Required fields are marked *