Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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';
FLUSH PRIVILEGES;

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 stackoverflow.com 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
1  
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

1 Answer 1

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

 
discard

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