Getting phpMyAdmin error
MySQL said: Documentation
#1045 - Access denied for user 'root'@'localhost' (using password: NO)
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.

I am using book 'Drupal 7' Tom Geller.
I installed
WampServer 2.1a [24/12/10]
Includes :
- Apache 2.2.17
- Php 5.3.3
- Mysql 5.5.8 (version 32 bits)
- PhpMyadmin 3.2.0.1
- SQLBuddy 1.3.2

Everything was working ok when there were no passwords.
Yesterday as per pg 16 I added a database and gave it a password. I can guess at the name but am not sure. I think I used an underline. Is there anyway of finding the database name?

There were three lines on the phpMyAdmin that said I needed to add a password which I did.

No I cannot get into phpMyAdmin. I have uninstalled and reinstalled multiple time to no avail. I get

Welcome to phpMyAdmin

Error

MySQL said: Documentation
#1045 - Access denied for user 'root'@'localhost' (using password: NO)
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.

I have looked at correction action on the web, and tried it, rebooted, etc, all resulting in same error.

How do I either unset root passwords or move forward?

I read it was not a good idea to put passwords in .ini files so I don't know what to.

I have an IT background but haven't done development for quite some time, so this is new to me.

Thanks

Comments

egl’s picture

dgibbs’s picture

Thanks! Your reference was very helpful. Got me going again!

tgeller’s picture

I appreciate you answering a question that came up in my book, and regret that the OP had these problems.

WAMP is such a problem... I first wrote about it a year and a half ago, at http://tomgeller.com/content/what-hells-wrong-drupal-wamp ("What the hell's wrong with Drupal on WAMP?"). Lately I've been recommending the Acquia Drupal Stack Installer instead -- see http://tomgeller.com/content/boon-beginners-acquia-drupal-stack-installe... . That's what I use in the recent lynda.com videos.

So why did I demonstrate using MAMP and WAMP in the book? Good question. First, I started writing the book way back in 2009, when it was originally intended for Drupal 6.14 -- then we delayed (and rewrote) it for Drupal 7. At the time I started, DAMP wasn't well-established. Also, DAMP requires some additional steps that are cumbersome to describe in print.

But if I were to do it again, I'd use DAMP in the book. Sorry for the inconvenience.

---
Tom Geller * tomgeller.com * Oberlin, Ohio
See my lynda.com videos about Drupal

chris31389’s picture

If you navigate to the WAMP folder .../wamp/apps/phpmyadmin3.5.1/

There should be a file called "config.inc.php"

It should have a section like this:

/* Server: localhost [1] */
$i++;
$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'] = '';
$cfg['Servers'][$i]['AllowNoPassword'] = true;

If you alter this:

$cfg['Servers'][$i]['password'] = '';

to

$cfg['Servers'][$i]['password'] = 'yourpasswordhere';

You can then refresh the phpmyadmin and it should work