Bug #18713 grant all privileges is only granting privileges to active table, not as doc

Submitted: 1 Apr 2006 22:57 Modified: 25 Mar 2011 22:11
Reporter: Paul webber Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.0.24 OS:Linux (Linux / Debian)
Assigned to: CPU Architecture:Any

[1 Apr 2006 22:57] Paul webber
Description:
On my server box (ip 192.168.80.1) I run this sequence:

cpe-65-172-232-162_4304:~$ mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10625 to server version: 4.0.24_Debian-10-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> grant all privileges on *.* to 'root'@'192.%.%.%';
Query OK, 0 rows affected (0.02 sec)

There are 10 databases on this machine as evidenced by show databases.  According to the docs, this should grant full privileges on *all* databases.  However, when I go to the client machine (ip 192.168.80.253) and do a 'show databases', it shows no databases.

If on the server I first do a:  use [database 1]   and then re-run the grant statement, now on the client machine show databases will show 'database 1'.  If I repeat this process for each database (use it, grant all) I can grant all privileges on all databases.  However according to the documentation, doing a 'grant all privileges on *.*' should automatically grant priviliges on all databases.

I posted a message in the forum: http://forums.mysql.com/read.php?11,78615,78615#msg-78615

The responses from fellow users indicate that everyone else also interprets the documentation to mean that 'grant all on *.*' grants for all databases, not just the active one.

How to repeat:
create 2 databases on the mysql server.  run the 'grant all privileges on *.*' command, and then connect to that server from a client pc.  The privileges were not granted, and show databases reports no databases.

Suggested fix:
grant all on *.* should grant privileges on all database, not just the currently selected one.
[2 Apr 2006 8:26] Valeriy Kravchuk
Thank you for a problem report. Sorry, but I was not able to repeat the behaviour you described on 4.0.27-BK on Linux. After:

openxs@suse:~/dbs/4.0> bin/mysql -uroot --host=127.0.0.1 --port=3340
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.0.27-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> grant all privileges on *.* to 'root'@'192.%.%.%';
Query OK, 0 rows affected (0.02 sec)

I was able to connect from 192.168.0.44 (5.0.19 on Windows) and SHOW DATABASES gave me all the databases I have.

So, please, try to repeat with a newer version, 4.0.26. Send the results of:

SELECT user, host from mysql.user\G

also.
[2 May 2006 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.043 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.