MySQL Triggers
From Hostek.com Wiki
Revision as of 19:51, 24 April 2013 by Maxm (Talk | contribs) (Created page with "<p>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...")
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: http://dev.mysql.com/doc/refman/5.5/en/triggers.html