Bug #36058 Grant command doesn't work
Submitted: 14 Apr 2008 13:37 Modified: 19 May 2008 10:14
Reporter: ijimenez ijimenez Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:4.1.18 Standard OS:Solaris (v. 9)
Assigned to: CPU Architecture:Any
Tags: Grant not supported?

[14 Apr 2008 13:37] ijimenez ijimenez
Description:
MySQL v4.1.18 standard:

With an user with grant option I try to create a new user in this way:

mysql> use test
Database changed
mysql> grant all on test.* to user2@'%' identified by 'user2';
ERROR 1132 (42000): You must have privileges to update tables in the mysql database to be
able to change passwords for others

With "root" session doesn't appear this behaviour. I know in other versions it exists the same bug, but the question is: Does Mysql 4.1.18 standard version has the same bug into?

Thanks

How to repeat:
mysqlPATHBin>mysql -h localhost -u user -p user; // user has GRANT privileges
mysql> use test
Database changed
mysql>grant all on test.* to user2@'%' identified by 'user2';
ERROR 1132 (42000): You must have privileges to update tables in the mysql database to be
able to change passwords for others

Suggested fix:
Maybe upgrade version?
[14 Apr 2008 17:51] Valeriy Kravchuk
Please, send SHOW GRANTS results for user.
[15 Apr 2008 8:28] ijimenez ijimenez
That is the printout of the command:

mysql> show grants for user;
+----------------------------------------------------------------------------------------------------------------------+
| Grants for user@%                                                                                                     |
+----------------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'user'@'%' IDENTIFIED BY PASSWORD '*293A6FB6CA752381E95C332E079829F75B63121A' WITH GRANT OPTION |
| GRANT INSERT, UPDATE, DELETE, CREATE ON `mysql`.`user` TO 'user'@'%' WITH GRANT OPTION                                |
| GRANT UPDATE ON `test`.`table1` TO 'user'@'%'                                                            |
| GRANT UPDATE ON `test`.`table2` TO 'user'@'%'                                                              |
| GRANT UPDATE ON `test`.`table3` TO 'user'@'%'                                                                       |
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE ON `test`.`table1` TO 'user'@'%'                                 |
+----------------------------------------------------------------------------------------------------------------------+
6 rows in set (0.00 sec)
[24 Apr 2008 11:18] Susanne Ebrecht
You only have the UPDATE grant privilege here for database: test not for database: mysql.

Please also read our documentation:

 http://dev.mysql.com/doc/refman/4.1/en/grant.html
[19 May 2008 10:14] ijimenez ijimenez
I have done whatever you told in last message, but I got the same result. There is  a bug trace in similar versions with "grant" instructions, couldn't it be the same bug?

For more information of this bug, please refer to:

http://bugs.mysql.com/bug.php?id=12143