List:General Discussion« Previous MessageNext Message »
From:D Crompton Date:May 28 2003 6:45pm
Subject:local vs %
View as plain text  
Taken from manual:

mysql> GRANT ALL PRIVILEGES ON *.* TO monty@localhost

    ->     IDENTIFIED BY 'some_pass' WITH GRANT OPTION;

mysql> GRANT ALL PRIVILEGES ON *.* TO monty@"%"

    ->     IDENTIFIED BY 'some_pass' WITH GRANT OPTION;

A full superuser who can connect to the server from anywhere, but who must
use a password 'some_pass' to do so. Note that we must issue GRANT
statements for both monty@localhost and monty@"%". If we don't add the entry
with localhost, the anonymous user entry for localhost that is created by
mysql_install_db will take precedence when we connect from the local host,
because it has a more specific Host field value and thus comes earlier in
the user table sort order.


-----------------------------

The above implies you should have 2 permissions for every user,  i.e. one
for
local and one for %

Is this really necessary?

We have root user and one other user called mark.  A lookup therefore
shows 4,  2 for each:

root@%
root@localhost

mark@%
mark@localhost


Should we really have 2 permissions for every user?.  Doesn't the root just
need access to localhost only?.



Thread
Getting data in excel into a mysql table?D Crompton28 May
  • Re: Getting data in excel into a mysql table?Karam Chand28 May
RE: Getting data in excel into a mysql table?Mike Hillyer28 May
  • local vs %D Crompton28 May
    • Re: local vs %Nils Valentin29 May
  • Re: local vs %D Crompton29 May