My navicat shows 1045 error Access denied for user 'root'@'localhost' (using password: YES) when I try to connect to the database
This has actually happened before but I solved it by modifying the my.ini configuration file to skip password verification, then changing the root user's password and logging in again
And there's nothing important in my database so I was like whatever xD
This happened again today so I tried to solve it with same way but failed
I skipped writing a lot of silly trial and error steps and jump directly to the steps that work.
So I use "mysqld --console" to view the output error log
It turns out that a process is occupying port 3306
Duh.
Then I used this command "netstat -ano | findstr :3306" in cmd to see which process was occupying port 3306 and note down its PID
Then the one occupying port 3306 happens to be Mysql.
WTF?
I terminated the process with PID 6700 and restarted the MySQL service. The service started successfully and access was not denied when the correct password was entered.
Since MySQL was started at the beginning, why would it deny access when the correct password was entered T . T
btw the version of my Mysql is 8.0.32
Comments
Displaying 1 of 1 comments ( View all | Add Comment )
DustyNotes
lol classic mysql pain sometimes it locks itself weirdly maybe check if there’s a duplicate mysql service or another instance running in the background next time also double check my.cnf for conflicting socket or port settings good luck man