Bug #902 Error On http://www.mysql.com/doc/en/Adding_users.html

Submitted: 23 Jul 2003 17:59 Modified: 28 Jul 2003 12:29
Reporter: Mike Hillyer Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:N/A OS:N/A
Assigned to: Paul DuBois CPU Architecture:Any

[23 Jul 2003 17:59] Mike Hillyer
Description:
On page http://www.mysql.com/doc/en/Adding_users.html the introduction to a sample does not match the sample that follows.

The introduction states: "The following example adds a user custom who can connect from hosts localhost, server.domain, and whitehouse.gov."

The sample then has:

->     TO custom@localhost
->     TO custom@whitehouse.gov
->     TO custom@'%'

Following the example, we have an explanation:

"The reason that we issue two grant statements for the user 'custom' is that we want the give the user access..."

Three grant statements are issued, not two.

A more complete copy of the sections in question are included in the how to repeat section.

How to repeat:
The following example adds a user custom who can connect from hosts localhost, server.domain, and whitehouse.gov. He wants to access the bankaccount database only from localhost, the expenses database only from whitehouse.gov, and the customer database from all three hosts. He wants to use the password stupid from all three hosts. 

To set up this user's privileges using GRANT statements, run these commands: 

shell> mysql --user=root mysql
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP
    ->     ON bankaccount.*
    ->     TO custom@localhost
    ->     IDENTIFIED BY 'stupid';
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP
    ->     ON expenses.*
    ->     TO custom@whitehouse.gov
    ->     IDENTIFIED BY 'stupid';
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP
    ->     ON customer.*
    ->     TO custom@'%'
    ->     IDENTIFIED BY 'stupid';
The reason that we issue two grant statements for the user 'custom' is that we want the give the user access to MySQL both from the local machine with Unix sockets and from the remote machine 'whitehouse.gov' over TCP/IP. 

Suggested fix:
Change:

->     TO custom@'%'

To:

->     TO custom@'server.domain'
[28 Jul 2003 12:29] Paul DuBois
Thank you for your bug report. This issue has been addressed in the
documentation. The updated documentation will appear on our website
shortly, and will be included in the next release of the relevant
product(s).

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

Page generated in 0.049 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.