Friday, June 29, 2012

ERROR - 1045 Cannot access 'root@localhost'

Phew after 2 days of extensive battle, finally I won - HOW TO INSTALL MySQL 5.6.x in Windows XP.

Well the best way is always to read its installation guide http://dev.mysql.com/doc/refman/5.1/en/windows-installation.html

Well but in short what most people would be facing is when the installer installs the package and opens the configuration wizard. And then it would stop at the point of "Applying Security Settings".

So here are the steps to deal with it.
  1. If Windows Firewall is on:
    1. Open the firewall,
    2. Go to Exceptions tab,
    3. Add Port
      1. Add MySql in the name
      2. Add 3306 in the port
      3. Say OK.
  2. Go to C:\Documents and Settings\All Users\Application Data\MySQL and delete any previous Files or folders of the version of MySql that you are now going to install.
  3. Try installing the MySQL again and it should work now.