[SWLUG] MySQL Question

Andy McKay lonewolff at gmail.com
Fri Jun 24 16:45:07 UTC 2005


On 6/24/05, Terry John <terry.john at bbc.co.uk> wrote:
>  
> 
> Before I pull my remaining two hairs out of my head.... 
> 
> 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'" 

Have you tried  mysql -h Server1 -u Bob -p   to access the database on Server1?
That should make you Bob at Server1 instead of Bob at localhost

> 
> The only way I cam make it work is to create ANOTHER user 'Bob'@'localhost'
> and try to maintain passwords & privileges between the two accounts. Yuk! 
>




More information about the Swlug mailing list