[SWLUG] MySQL Question

Bron swlug at geode.org.uk
Fri Jun 24 17:11:56 UTC 2005


On Fri, 2005-06-24 at 15:30, Terry John wrote:

> I have 2 Linux servers Server1 running mysqld, and Server2. I want to
> create a user that can access a database on Server1 from both
> machines.
> 
> So I create a user 'Bob'@'%'
> 
> I can happily access the database from Server2  using the command:
> 
> mysql -h Server1 -u Bob -p
> 
> But when I go on Server1 & type in
> 
>   mysql -u Bob -p               I get "Access denied for user
> 'Bob'@'localhost'"
>   mysql -u 'Bob'@'%' -p         I get "Access denied for user
> 'Bob'@'%'@'localhost'"
>   mysql -h Server1 -u Bob -p    I get "Access denied for user
> 'Bob'@'Server1'"
> 
Are you allowing the anon. user to access the MySQL server on your
Server1.? 
This special account is created on install and is used when named users
try to log in locally.
- If so you should grant privs to all local users explicitly.
[Remember to flush afterwards]
- Or, delete this anon. user from mysql.user table.






More information about the Swlug mailing list