3
votes

I have been using XAMPP for a while now, but this morning seems like something kinda went wrong. I am using XP with XAMPP 5.3.5.

I develop at home, and I use my other computer as a server. running PHP/APACHE/MYSQL on XAMPP. I am using phpMyAdmin to manage my db. I noticed that my webpage was not responding too quickly, would lag and return an error about not being able to connect to the DB. (I lost that error message, I tried too many times).

  1. I ended up changing the root security password inside phpMyAdmin
  2. changed the config.inc.php for that very same password

Still I get this message:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: NO) in C:\xampp\htdocs\MyProject\includes\connection.php on line 5 Database connection failed: Access denied for user 'root'@'localhost' (using password: NO).

Why does it say "using password: NO" ? I did create a password for root, and also for the directory, and also updated config.inc.php How do I recover from this, seems like a work day has passed by. Thanks !!!

6
One more thing... When I try to log into phpMyAdmin, I get a user:pass form but none of the user:pass I know I have given seem to work! - Ted

6 Answers

2
votes

Rule #1: DO NOT USE root for application programming.

Try logging onto the database using the mysql client and your root password. If that doesn't work, you may have to reset your root password. The MySql docs have instructions for that.

0
votes

Have you tried with root as both the username and password?

0
votes

you might try searching your browser cookies for "localhost". you could then delete any pma related items as they may contain outdated credentials

0
votes
Simply to add the password or remove the existing one
1. Go to your root of phpmyadmin. Select the user tab.
2. Select the user that you assign.
3. Click on Edit Privileges.     
4. Find on login information fieldset
5. Adjust the password you wanna set

That's it may helpful

0
votes

I know this sounds sounds bizarre, but on my new installation on Win7, using the Xampp stack, I typed '127.0.0.1' in 'username' field, and left 'password' blank. It took me straight to the control panel!

0
votes

XAMPP has a weird default configuration and accepts any user from any host. So the first time you open phpMyAdmin just use localhost for the server and don't type any user/pass. Once you're in delete both "Any" user accounts and create your own.