Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Whenever i try to connect to the server i get this:

Access denied for user 'root'@'localhost' (using password: YES)

I tried resetting the password with this that i used from mysql official site:

UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';

If i type mysql or mysql -pi always get the same message, even if i try GUI programs to connect to server. I can only start and stop the server, nothing else, i always get denied access. Its localhost server, i also tried to commenting out the bind-address in the confi file but still getting denied access.

I dont know what else to do.

share|improve this question

migrated from May 4 '12 at 13:26

This question came from our site for professional and enthusiast programmers.

Its error 1045 btw. – user984211 Oct 8 '11 at 9:48
If you can't get into the server, how are you running that update statement? Are you starting MySQL with root password disabled? Or are you not actually running it? – Corbin Oct 8 '11 at 10:28

On the webpage you were reading, there is a comment remark about using InnoDB databases:

Make sure you have your InnoDB Base Directory and Data Directory path's correct or you will continue to get this error. "Error 1045 Access denied for 'root'@'localhost'[using password: Yes] "

If you have InnoDB set up you must have the correct path to these two directories in MySQL.

It could be what you are experiencing.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.