I installed the MySQL 5.7 using the installer on my windows machine, and then changed the data directory from C drive to D driver (following the idea from this link:
http://dba.stackexchange.com/questions/24403/change-existing-datadir-path)
I was able to use MySQL without any problems for like a week. But then I suddenly couldn't log in: Error 1045 (28000): Access denied for user 'root'@'localhost'.
The first time this happened, I thought I accidentally change my password. So I reinstalled everything to make sure I have the right password. However, the same "wrong password" issue occurred again a week after re-installation.
I also tried to re-set the root password following this link:
https://dev.mysql.com/doc/mysql-windows-excerpt/5.7/en/resetting-permissions-windows.html. It didn't work either.
Anyone has any idea? It's driving me nuts... Does it have something to do with the directory change? Or there is some bug?
BTW. I also sqldeveloper on my machine. Not sure if it will cause any conflict with mysql.