Vicky Dailey
Vicky Dailey

Reputation: 31

PHPMyAdmin working but can't receiving "Access denied for user ''@'localhost' (using password: NO)" error

I'm using IIS with PHP, PHPMyAdmin and mysql. They were installed separately. When mysql was installed, I was given the option to and went ahead with setting a password. I can use phpmyadmin using the same password, but when I test my database connection I receive the error Access denied for user ''@'localhost' (using password: NO).

I've been all over forums and youtube looking for a possible solution but haven't been able to get anywhere. I have disabled my firewall and attempted to allow mysqld through it separately and still no results.

PHPMyAdmin resides in my wwwroot folder for IIS and mysql is in my C:/Progam Files folder. Is this the possible issue or is this set up okay?

Additionally, I've reviewed my config files and all have the same matching password. My user is root and all config files have that as well. PHPMyAdmin accepts that as the user.

Upvotes: 1

Views: 1855

Answers (2)

000
000

Reputation: 3950

It looks like you are giving user as username under config.inc.php without any password..

You can either provide the correct password for username user

or

You can provide the same username and password which lets you login to mysql from command prompt..

Upvotes: 1

damiankolasa
damiankolasa

Reputation: 1500

What it seams to me is that your phpMyAdmin is not correctly configured. You lack username and password options thus you cannot connect. You should review: http://docs.phpmyadmin.net/en/latest/config.html#basic-settings and look for $cfg['Servers'][$i]['nopassword'] option. It should be disabled. P.S.: Do you get username/password prompt from phpmyAdmin ?

Upvotes: 1

Related Questions