List:General Discussion« Previous MessageNext Message »
From:Pam Astor Date:April 21 2008 12:48am
Subject:RE: Granting users localhost access
View as plain text  


> Date: Sat, 19 Apr 2008 20:06:49 +0200
> From: schalk@stripped
> To: pamastor@stripped
> CC: mysql@stripped
> Subject: Re: Granting users localhost access
> 
> Hi Pam,
> 
> If you want to grant a specific user remote access i.e. from a shell or 
> from an application that resides on a different machine then you will 
> have to adjust the query I sent earlier:
> 
> update mysql.user set host = '%' where user = 'AUserName';
> FLUSH PRIVILEGES;
> 
> The above two queries will firstly update the mysql database to allow 
> the user specified to connect from any host and will then force the 
> MySQL server to reload the privileges, essentially meaning refresh so 
> that the next time this user tries to connect to the database MySQL will 
> be aware of the change made to the users account and allow them to 
> access the database from a remote host.
> 
> If you do not want to allow access from any host but for example 
> localhost and a specific IP then you can do:
> 
> update mysql.user set host = 'localhost, 69.89.2.231' where user = 
> 'AUserName';
> FLUSH PRIVILEGES;
> 
> Regards,
> Schalk

Thanks so much Schalk,

OK here is what I did – it's still is not working.  I ran the command:
update mysql.user set host = 'localhost, %' where user = 'myusername';FLUSH PRIVILEGES;

I then checked the user table with the command: SELECT * from mysql.user;

I find the below entry in the table:

|
localhost, % | myusername   | 0528e2af7e81824b | N           |
N           | N           | N           | N           | N         |
N           | N             | N            | N         | N          |
N               | N          | N          | N            | N          |
N                     | N                | N            |
N               | N                | N                | N             
| N                   | N                  | N               
|          |            |             |              |             0
|           0 |               0 |                    0 |

It appears that the changes took place since both localhost and % are now listed above.

I
then logged out of root, then tried to log back in with the username
that I just updated using login command:  mysql -uMyUserName
–pMyPassword123

And I still can’t get a login:  Access denied for user 'myusername'@'localhost'
(using password: YES)

Whenever I login as root, I use the command: mysql -uroot –pMyRootPassword12321

_________________________________________________________________
More immediate than e-mail? Get instant access with Windows Live Messenger.
http://www.windowslive.com/messenger/overview.html?ocid=TXT_TAGLM_WL_Refresh_instantaccess_042008
Thread
Granting users localhost accessPam Astor19 Apr
  • Re: Granting users localhost accessSchalk Neethling19 Apr
    • RE: Granting users localhost accessPam Astor19 Apr
RE: Granting users localhost accessPam Astor19 Apr
RE: Granting users localhost accessPam Astor19 Apr
Re: Granting users localhost accessSchalk Neethling19 Apr
  • RE: Granting users localhost accessPam Astor21 Apr