-1

root@test-2:/usr/local# mysql -u root -H 192.168.x.xxx -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

sivashanmugam
  • 37
  • 2
  • 6
  • duplicate of http://serverfault.com/questions/230012/mysql-access-denied-for-user-rootx-x-x-x?rq=1 or http://serverfault.com/questions/353278/error-1045-28000-access-denied-for-user-rootlocalhost-using-password-y?rq=1 or one of the other 10th of questions about the same thing here. – Dennis Nolte May 28 '14 at 12:54

2 Answers2

2

-H is an alias for --html, which will

Produce HTML output.

You're looking for -h or --host=.

jornane
  • 1,166
  • 1
  • 9
  • 26
0

consider using following:

[alexus@wcmisdlin02 ~]$ cat ~/.my.cnf 
[client]
user=root
password=password
[alexus@wcmisdlin02 ~]$ 

you can include host=fqdn as well.

alexus
  • 13,112
  • 32
  • 117
  • 174