Bug #41313 network administrator does not have TRIGGER and EVENT privileges
Submitted: 8 Dec 2008 23:31 Modified: 10 Dec 2008 17:45
Reporter: John Kienitz Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Installing Severity:S2 (Serious)
Version:5.1.30 OS:Any (Windows)
Assigned to: Kent Boortz CPU Architecture:Any
Tags: trigger

[8 Dec 2008 23:31] John Kienitz
Description:
The default privileges for the network administrator 'root'@'%' do not have TRIGGER and EVENT privileges.

They cannot give themselves these privileges, and cannot give them to other users.

Work around is to edit the user table and give these privileges to this user, then reload privileges.

This user has all other privileges SUPER, GRANT, etc, but is unable to give EVENT and TRIGGER to itself.  Very strange.  Should not GRANT allow this?

How to repeat:
Install MySQL 5.1.30.  Look at privileges given to 'root'@'%'

Suggested fix:
add these privileges to the default privileges for this user.
[9 Dec 2008 7:17] Sveta Smirnova
Thank you for the report.

What do you mean by "network administrator 'root'@'%' "? I can not repeat such problem if I give correct rights to an user:

GRANT ALL PRIVILEGES ON *.* TO 'foo'@'localhost' WITH GRANT OPTION;
show grants for 'foo'@'localhost';
Grants for foo@localhost
GRANT ALL PRIVILEGES ON *.* TO 'foo'@'localhost' WITH GRANT OPTION
select  Event_priv, Trigger_priv from mysql.user where user='foo';
Event_priv      Trigger_priv
Y       Y
[9 Dec 2008 17:01] John Kienitz
Maybe this is windows only.

Do a new install of MySql 5.1.30.

look at the privileges for the network root user at '%'.

It does NOT have TRIGGER or EVENT privileges.

look at the privileges for the network user at 'localhost'.

It does have TRIGGER and EVENT privileges.
[10 Dec 2008 17:45] Sveta Smirnova
Thank you for the feedback.

Verified as described: no trigger and events rights for root@% on Windows, although there are such rights on UNIX.

Workaround: manually edit mysql.user table, then flush privileges.
[12 Jun 2009 8:42] Valeriy Kravchuk
Bug #42260 was marked as a duplicate of this one.