When you try to run WordPress in windows and you got this error “ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password:NO)”, you can follow this steps to solve the issue.

1) You can set root password by invoking MySQL console. It is located in

C:\wamp\bin\mysql\mysql5.1.53\bin by default.

Get to the directory and type MySQL. then set the password as follows..

> SET PASSWORD FOR root@localhost = PASSWORD('new-password');

2) You can configure wamp’s phpmyadmin application for root user by editing


It looks like this:

$cfg['Servers'][$i]['verbose'] = 'localhost';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'YOURPASSWORD';
$cfg['Servers'][$i]['AllowNoPassword'] = false;

The error “Access denied for user ‘root@localhost’ (using password:NO)” will be solved when you set $cfg[‘Servers’][$i][‘AllowNoPassword’] to false

Note: phpmyadmin is a separate tool which comes with wamp. It just provide a interface to MySQL. if you change my sql root’s password, then you should change the phpmyadmin configurations. Usually phpmyadmin is configured to root user.

There are currently no comments.