0

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 user@y.y even though I have specified -h option

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

michelem
  • 14,430
  • 5
  • 50
  • 66
tempuser
  • 1,517
  • 3
  • 11
  • 15
  • 2
    There is a perfect answer for you: [MySQL ERROR 1045 (28000): Access denied for user 'bill'@'localhost' (using password: YES)](http://stackoverflow.com/a/11216911/767881). Read `localhost` as your `y.y.y.y` – Ravinder Reddy Jul 16 '15 at 07:19
  • In error "user@y.y" means your current ip is y.y – Aman Aggarwal Jul 16 '15 at 07:26

1 Answers1

1

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
Community
  • 1
  • 1
bish
  • 3,381
  • 9
  • 48
  • 69