Skip to content

[FIX] PHP MyAdmin Error “1045-Access denied for user’root@’localhost'(using password:no)

November 22, 2012

While opening/accessing  PHP MyAdmin in browser following Error

1045 – Access denied for user ‘root’@’localhost'(using password:NO)

Fix:-

1. Go to C:\xampp\phpmyadmin then open the config.inc or config.inc.php file

2. On line number 20 you will see this

$cfg[‘Servers’][$i][‘user’]=’root’;

Make sure that the ‘root’ is the user to access your own database server.If not, change the ‘root’ to your own user name.

3. In line 21 you will see this

$cfg[‘Servers’][$i][‘password’]=”;

This means that your database server doesn’t have password save in it. If your database server has a password, type the password between the single quotes for example ‘mysql’.

However, if there is a password stored like this:

$cfg[‘Servers’][Si][‘password’]=’mysql’;

then you have to change ‘mysql’ into the password your database server is using for example ‘developer_password’

4. Clear your cookies then reload localhost

NOTE:- If password is not set default password is ‘root’

Advertisements
Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: