When backing up a MySQL DB hosted on Azure, the dump files are being exported with “DEFINER=” clauses.
i.e.
/!50003 CREATE/ /!50017 DEFINER=myuser
@%
/ /*!50003 TRIGGER trg_my_entity_after_insert AFTER INSERT ON my_entity FOR EACH ROW
Azure does not allow our admin user to have full DBA rights, so when I try to restore from this backup dump I get the following error :
ERROR 1227 (42000) at line 919: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
This error does not occur in a MySQL DB server where I have DBA rights.
From what I have read, the way to strip out these clauses is to run it through sed or some other regular expression replacement tool. Ideally though, MySQL should have an option to suppress them altogether.
Is there any way we can automatically do this using the SQLBackupAndFTP tool?