| Bug #20599 | Incorrect behavoiur of "flush privileges" command | ||
|---|---|---|---|
| Submitted: | 21 Jun 2006 10:24 | Modified: | 1 Jul 2006 7:43 |
| Reporter: | Andrea Pantaleoni | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | MySQL Server | Severity: | S3 (Non-critical) |
| Version: | 5.0.22 | OS: | Linux (linux redhat and debian) |
| Assigned to: | CPU Architecture: | Any | |
[21 Jun 2006 10:24]
Andrea Pantaleoni
[21 Jun 2006 14:11]
Valeriy Kravchuk
Please, send the exact sequence of SQL statements that demonstrates the behaviour you described. With FLUSH PRIVILEGES, if any.
[21 Jun 2006 14:30]
Andrea Pantaleoni
ON THE SERVER AS ROOT
1)use mysql
2)insert into user (Host,User,Password) values ('%','soccer',PASSWORD('soccer'));
3)flush privileges;
4)create database soccer;
5)insert into db (Host,Db,User) values ('%','soccer','soccer');
6)flush privileges;
ON THE SERVER AS USER SOCCER
1)show databases;
I don't not soccer db
ON THE SERVER AS ROOT
1)Update db set Select_priv='Y',Insert_priv='Y',Update_priv='Y',Delete_priv='Y' where host='%' and db='soccer' and user='soccer';
2)flush privileges;
ON THE SERVER AS USER SOCCER
1)show databases;
I see soccer db
ON THE SERVER AS ROOT
1)Update db set Create_priv='Y' where host='%' and db='soccer' and user='soccer';
2)Flush privileges;
ON THE SERVER AS USER SOCCER
1)Create table test (idTest int(11) NOT NULL);
I get: ERROR 1142 (42000): CREATE command denied to user 'soccer'@'localhost'...
To create the table I have to disconnect and reconnect as user Soccer then I have the rights to perform the create statement
[1 Jul 2006 7:43]
Sergei Golubchik
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on how to report a bug at http://bugs.mysql.com/how-to-report.php See also http://dev.mysql.com/doc/refman/5.0/en/privilege-changes.html
