I'm rolling out an update for some software, which include running a SQL script to create triggers.

In my .sql file syntax, I did not include any DEFINER clause, as I want my customer's production MySQL user (which they set up by themselves) to be able to execute these triggers when the program is running.

Thing is, tests showed that MySQL automatically creates a DEFINER for the TRIGGER, with 'CURRENT_USER'@'%'. When you do the sensible thing, and use a (restricted) account for day-to-day data manipulation and another one for big updates (root ?), you end up trying to execute the TRIGGER with one or multiple users who have no permission to do it.

Is there a way to remove this "auto-add definer" feature ?

I tried entering DEFINER = '%'@'%' but this is not accepted.

Edit
Report