January 25, 2012

mySQL: ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)


Installing mySQL isn't pain in ass like MSSQL. But, When installing it, I got following error that created havoc in my brains:

mySQL: ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)

I believe this happens because you have already uninstalled previous mySQL and reinstalling it but, during previous un-installation the following directories were not completely removed.

What I did, was:
Uninstall MySQL using Programs and Features/Add or Remove Programs
Remove %programfiles%\MySQL Directory.
Remove %programdata%\MySQL Directory.
Re-install MySQL.