Difference between revisions of "MySQL Triggers"
From Hostek.com Wiki
(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...") |
(No difference)
|
Latest revision as of 19:51, 24 April 2013
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