1

I have one instance of mysql.

It is running at "C:\Program Files\MySQL\MySQL Server 5.5\bin\"

Now, when I try to connect using "heidisql" tool using user name as "root" and password as "eagle" then it connects properly and show the databases which I had created.

Now I open Command Prompt and go to the location where my MySQL service is running, Here I executed the same command but not working like shown below,

C:\Program Files\MySQL\MySQL Server 5.5\bin>mysql -uroot -peagle
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

Also, now I closed all the mysql server and then typed

"C:\Program Files\MySQL\MySQL Server 5.5\bin>mysql"

then it connects properly. I am not getting as all my mysql server is off then whom it is connecting to.

I am suspecting some where I have 2 instances of mysql running but I checked ControlPanel, Services running, No where I found any other service.

If any body faced such issue and solved, please suggest me solution.

Jayesh
  • 6,047
  • 13
  • 49
  • 81

1 Answers1

0

There can be some root users on the same MySQL server which differ by host, for example - 'root'@'localhost', 'root'@'%', 'root'@'server'. All these users can have different passwords. Check it firstly, and specyfy -h or --host option in your command line.

Also, command line syntax is incorrect, it should be like this -

mysql -u root -peagle
Devart
  • 119,203
  • 23
  • 166
  • 186