[Best Solution] "access denied for user 'root'@'localhost' (using password yes)" in MySQL Window 10

 If you are not able to sign in to MySQL server then you are on the right page, as I was also facing this error as shown in image 1. After installing MySQL workbench on Windows, I successfully sign in to the MySQL server first time. But after using it once, I was continuously getting the error "access denied for user 'root'@'localhost' (using password yes) windows". I was literally frustrated at one time. Therefore, I started looking for a solution to resolve this error. Fortunately, I found a video on the same topic. And It has a good no of views which indicates that not only me but many people getting the same error. I followed the video and was thankfully able to resolve the login error in the MySQL server. I am surprised that on the google engine there is nothing helpful on this topic. Therefore, I thought, I should write on this issue to help beginners in MySQL. I am going to guide you step by step with a snapshot. 

These are the following steps to resolve login error in MySQL

1. First of all, go to the task manager and services. Look for MySQL and stop the service by right click.

2. Now create a file on the desktop and name it as mysql-init. Write the following SQL queries:

3. Once save the above file, go to C drive and go to the bin folder of the MySQL installation folder and copy the path of the bin folder. 

4. Open the cmd as administration, navigate the bin folder by cd command as cd C:\Program Files\MySQL\MySQL Server 8.0\bin

5. Now again to c drive and check whether there is a program data folder if it does not appear then enable the hidden items in the view tab as shown in img.

6. If you found the program data folder, open the folder and go into MySQL server folder. Copy the directory path of the my.ini file as shown in img.

7. Move to cmd and write the following command

8. Enter and see if there is a ready for connection statement at the end. If yes, try to get out of the cmd by pressing ctrl + c or clicking on the close icon. 

9. Now you can start the MySQL service by task manager as we turned it off.

10. Open the cmd and check if you still getting the same error or not. I am damn sure, your issue will be fixed. 

Conclusion: if you are still getting this error then no option is left except to reinstall the MySQL workbench and see if the error still exists or not. Though, the solution I shared above will solve the same error at 99.9%. I Hope, this page is helpful to you, and see you on the other page anytime soon.



1 Comments

  1. I have a website for NDA aspirant Help4nda.blogspot.com
    Please share

    ReplyDelete
Previous Post Next Post

Ads

Ad