MySql remote server login issue

128 Views Asked by At

I am using below command on server with ip y.y.y.y to connect to DB hosted on x.x.x.x

mysql -u user -p -h x.x.x.x

I am getting below error, I don't why its picking [email protected] even though I have specified -h option

ERROR 1045 (28000): Access denied for user 'user'@'y.y.y.y' (using password: YES)

1

There are 1 best solutions below

0
On

Make sure the following things are true:

  • Are your credentials really correct? (Host, User, Password, Database, Port)
  • Does the server allows remote acces (bind adress = x.x.x.xin my.cnf)
  • Can the host be uniquly identified? (See: this SQ questions