1

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.

000
  • 3,976
  • 4
  • 25
  • 39

2 Answers2

1

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 ?

damiankolasa
  • 1,508
  • 9
  • 8
  • 1
    I do receive a user and password prompt when going into PHPMyAdmin. I use root and the MYSQL password I set up initially and it logs in okay. The issue is when attempting to connect "native" to the database - MYSQL application disappears right away and when attempting to connect via PHP code I receive the error above. – Vicky Dailey Nov 25 '12 at 17:13
  • So the issue is with your php script not phpmyadmin ? – damiankolasa Nov 25 '12 at 20:32
  • PHPMyAdmin is working properly, I've checked my php code and I have the same parameters in there as I'm using with PHPMyAdmin. – Vicky Dailey Nov 26 '12 at 23:33
1

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..

000
  • 3,976
  • 4
  • 25
  • 39
  • This makes sense to me; however, when I opened that file there was no user information contained within it. Is there a specific string of information I can search for? I also added a user to MYSQL via PHPMyAdmin with all priveleges with the username user and am still receiving the same error. When I attempt to log into PHPMyAdmin with the new user account, I receive a 1045 error, unable to log in. – Vicky Dailey Nov 25 '12 at 18:01
  • [check this link](http://stackoverflow.com/questions/13408281/phpmyadmin-error-with-config-file/13410103#13410103), if it helps.. – 000 Nov 26 '12 at 07:59
  • Thanks, I was able to find that file. This was also set to 'root' when I opened the document. All my config files look to be configured correctly; however, in the phpmyadmin folder, I have a config folder and a config document. Could this be creating confusion even though they are both set to 'root'? – Vicky Dailey Nov 26 '12 at 23:50
  • i am not sure..on my setup i am not having _config_ folder..you may provide the link from where you downloaded _phpmyadmin_.. – 000 Nov 27 '12 at 05:34