-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)

1

2 Answers 2

2

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

Produce HTML output.

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

2
  • yes .. it's silly mistake Thanks a lot ..Yørn May 28, 2014 at 13:48
  • 1
    Team ,please consider the question before making into negative [-] marks May 28, 2014 at 13:49
0

consider using following:

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

you can include host=fqdn as well.

Not the answer you're looking for? Browse other questions tagged .