Monday, 18 February 2013

#1045 - Access denied for user 'root'@'localhost' (using password: NO)

#1045 - Access denied for user 'root'@'localhost' (using password: NO)


In Windows 7/8 Here is the procedure for enabling remote login/access to mysql database for a user account 'root'


1) Goto MySQL Command prompt

2) Login as root user

      mysql -u root -p

3) Enter Password

4)Show Databases;

5) select MySQL Database(System database for MySQL)

Use MySql;

6) Grand permissions to 'root' user

mysql>Grand ALL on HR.* to 'root'@'localhost' identified by 'password'

7) Grant Access to Existing Database;

mysql>update db set host='localhost' where db='HR';

mysql>update user set host='localhost' where user='root';

8) Exit

mysql>exit;


Note:Here my DB name is 'HR' ,So replace according to your requirement.


Tags:#1045 - Access denied for user 'root'@'localhost' (using password: YES),#1045 - Access denied for user 'root'@'localhost' (using password: NO),how do i enable remote access to mysql database server,remote login to mysql in asp.net