Bug #50973 MySQL 5.1: root no grant privileges?
Submitted: 7 Feb 2010 23:25 Modified: 8 Feb 2010 10:38
Reporter: Harald Reindl Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Security: Privileges Severity:S3 (Non-critical)
Version:5.1.43 OS:Any
Assigned to: CPU Architecture:Any

[7 Feb 2010 23:25] Harald Reindl
Description:
The following message since months from phpMyAdmin
Manually editing the mysql-database / "flush privileges" works

Now i found the reason:
mysql.user: "Event_priv" was disabled and i'm pretty sure this was not by me and introducet while upgrade mysql to 5.1

UPDATE `mysql`.`user` SET `Event_priv` =  'Y' WHERE `user`.`User` =  'root';
__________________

GRANT ALL PRIVILEGES ON `autotest` .  * TO 'autotest'@'localhost';

MySQL meldet: Dokumentation
#1044 - Benutzer 'root'@'localhost' hat keine Zugriffsberechtigung 
für Datenbank 'autotest' 

How to repeat:
* create a new user
* create a new database
* try grant user permissions to the database with root-user

Suggested fix:
There should be nothing root has no permissions after upgrades, a solution could be if tehre is a user with all other privileges this should be added by mysql_upfrade-command

UPDATE `mysql`.`user` SET `Event_priv` =  'Y' WHERE `user`.`User` =  'root';
[8 Feb 2010 4:15] Peter Laursen
"was disabled and i'm pretty sure this was not by me and
introducet while upgrade mysql to 5.1"

.. so did you run the 'mysql_upgrade' program after upgrading? Even the installers (Windows and RPM installers) cannot do as they are not clients.

Peeter
(not a MySQL person)
[8 Feb 2010 8:02] Harald Reindl
Yes, everytime after updates i run "mysql_upgrade -p" manually
[8 Feb 2010 9:45] Sveta Smirnova
Thank you for the report.

This looks like duplicate of bug #28627. Which exact version do you use?
[8 Feb 2010 10:07] Harald Reindl
Yes, http://bugs.mysql.com/bug.php?id=28627 looks similar

This time we are using MySQL 5.1.43

I had this problem from Beta-Versions and thought this could be a phpMyAdmin-Bug with 5.1, after running 5.1 since some month yesterday i treid to find out what happens here.

Seems that 5.1 introduces new privilege-columns which are not implicit active for root-users after upgrade, the problem for me is solved, but i think there are people outside with 5.0 who will trigger this sooner or later
[8 Feb 2010 10:20] Sveta Smirnova
Thank you for the feedback.

I can not repeat described behavior. What was exact 5.0 version number you are upgrading from?
[8 Feb 2010 10:30] Harald Reindl
Sorry, i do not know
The upgrade happened under stress last summer

In the meantime used i tool inside our panel which creates user/db and manually added the records in the permission-tables
[8 Feb 2010 10:38] Sveta Smirnova
Thank you for the feedback.

In this case I am afraid we can not repeat the problem. So I close the report as "Can't repeat". Feel free to reopen it if you are able to provide more information.