Link to home
Start Free TrialLog in
Avatar of Jason Yu
Jason YuFlag for United States of America

asked on

can't connect to mysql database locally but can connect to remotely

Dear esteem experts:

I got a funny situation here for my Mysql database server. I can connect to this database from a remote server but can't through local terminal.

here is the output I got:

[root@hera ~]# mysql -u root -h localhost -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
[root@hera ~]#

---------------------------------------------------
but I can connect through a windows server:

C:\Program Files\MySQL\MySQL Server 5.5\bin>mysql -u root -p -h hera.minkagroup.
net
Enter password: ********
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8871
Server version: 5.1.61 Source distribution

Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>



--------------------------------------
I guess my predecessor set up some permission limit like only permit "root" user to connect from a specific machine. Would you guys help me trouble shoot this.

thank you.
ASKER CERTIFIED SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial