MySQL Triggers

From Wiki
Jump to: navigation, search

When creating triggers, the definer needs to use an existing user with host on the MySQL server. If your MySQL database user is 'username'@'%' then the definer needs to use 'username'@'%'. You won't be able to use 'username'@'localhost' unless there is user created for the host also.

When using an existing user with a different host in the definer than what exists on the MySQL server will result MySQL attempting to create that user for that host on the server. Creating users requires Super User privileges, so when it attempts to do that, you will get the following error:

SQL ERROR: 1227: Access Denied: you need the SUPER privileges for this operation.

For more information on MySQL Triggers, refer to: