Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4961
  • Last Modified:

#1045 - Access denied for user 'root'@'localhost' (using password: NO)

Hello.

I installed the WAMP server. I then right-click the shortcut and run as administrator. It was obvious that PHP and Apache work, by MySQL has a problem. When I run the phpMyAdmin in the browser, I get the error:
#1045 - Access denied for user 'root'@'localhost' (using password: NO)

I use ZoneAlarm. I let it accept incoming/outgoing traffic over the port 3306 for the trusted network which of course includes "localhost".

I looked up the internet for help. It says to give localhost a password. But that can't work with phpMyAdmin coded for WAMP because phpMyAdmin is coded not to give a password.

What should I do next?

Jean
0
JeanLeFrancais
Asked:
JeanLeFrancais
  • 6
  • 3
  • 2
  • +2
1 Solution
 
JeanLeFrancaisAuthor Commented:
Clarification: where I say "It says to give localhost a password. " I meant to say "It says to give  the root a password. "
0
 
JeanLeFrancaisAuthor Commented:
Another thing. I installed successfully WAMP on another computer running Windows 7 as well. Same products, the only difference is the firewall.
0
 
ComputerTechieCommented:
Does it work correctly if you disable zone alarm?

CT
0
Automating Your MSP Business

The road to profitability.
Delivering superior services is key to ensuring customer satisfaction and the consequent long-term relationships that enable MSPs to lock in predictable, recurring revenue. What's the best way to deliver superior service? One word: automation.

 
FishMongerCommented:
Did you specify a root password during the WAMP install process?

The error message is telling you that it expects root to provide a password when logging in from localhost, which is not being provided when going through phpMyAdmin.

Have you tried logging in to the cli directly at the command prompt, rather than using phpMyAdmin?

C:\>mysql -u root -p
Enter password: **********
Welcome to the MySQL monitor.  Commands end with ; or \g.
....
....
0
 
FishMongerCommented:
I've never used phpMyAdmin, but a quick google search indicates that the mysql login info is stored in config.inc.php

Look for lines like this:
$cfg['Servers'][$i]['user'] = 'phpmyadminuser'; // MySQL user
$cfg['Servers'][$i]['password'] = 'the_password';
0
 
gr8gonzoConsultantCommented:
1. The firewall is not the issue. The fact that you get an error message that comes -FROM- MySQL means that the communication is happening. Otherwise, you would get a timeout or general network issue.

2. WAMP is just a concept, not an actual specific software package. There are a lot of preconfigured WAMP setups:
http://en.wikipedia.org/wiki/Comparison_of_WAMPs

...so it would help to know which package you installed (e.g. WampServer, XAMPP, etc...), or if you installed each piece individually. You mentioned "The WAMP server" so I'm assuming you mean WampServer, but it's better to confirm.

3. Fishmonger is correct that phpMyAdmin does have a config file where you can specify a specific password if you set one. I would also try using HeidiSQL (a free/open-source, Windows-based MySQL client):
http://www.heidisql.com/
... and see if you can determine the correct login credentials from there.

Honestly, I prefer HeidiSQL over phpMyAdmin any day, but if nothing else, it will make it easier to test things. You should be able to reset the MySQL password if it got screwed up somehow:
http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html
0
 
Shinesh PremrajanCommented:
I think the latest version of the MySQL doesnt allow blank password for the database.
try this in the command prompt:
c:\wamp\bin\mysql -u root -H localhost

Then provide a blank password by pressing just enter key. If this works then there is some issue with the PHPMyadmin installation.

Hope this helps

~Shinuq
0
 
JeanLeFrancaisAuthor Commented:
Shinuq,

To your command c:\wamp\bin\mysql -u root -H localhost, I get the error
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

I just don't understand. I installed the exact same WampServer version on my other laptop at work without trouble under the same OS Windows 7. I notice that my laptop at home (the one with the issue) shows a blue-yellow shield onto the Wampserver icon and other icons. I don't have any shield on the icons on my laptop at work.

Jean
0
 
FishMongerCommented:
Did you try resetting the password using the instructions that gr8gonzo linked to?
How to Reset the Root Password
0
 
JeanLeFrancaisAuthor Commented:
I just realized that I had Zend Server Community edition still installed, and the MySql service running is the one from Zend, not WampServer. I tried to remove the service, but that option does not exist. Also I tried to deinstall Zend Server CE but I received an error message that the installation failed.

I do I remove Zend?

Jean
0
 
JeanLeFrancaisAuthor Commented:
your instruction didn't resolve the whole thing, but it was a necessary step. It turns out that I had Zend Server MySql still running as service. I removed it then ran your command from that web site and set a password for MySql, then I edited the config.inc.php file from phpMyadmin to match that password. I restarted the WampServer services, and bingo! It worked.
0
 
gr8gonzoConsultantCommented:
It would be nice to get the points for being the first one to post that link...
0
 
JeanLeFrancaisAuthor Commented:
I had forgotten that you were the first to post that link. Sorry.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 6
  • 3
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now