Web Design Forum: MySQL error message in phpMyAdmin - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

MySQL error message in phpMyAdmin Accessing phpmyadmin on local server displays error message

#1 User is offline   Ade 

  • Dedicated Member
  • PipPip
  • Group: Members
  • Posts: 105
  • Joined: 22-February 09
  • Reputation: 1
  • Gender:Male
  • Location:UK
  • Experience:Advanced
  • Area of Expertise:Web Designer

Posted 22 August 2009 - 06:07 PM

When I try to access phpMyAdmin on my local setup (using WAMPserver) I get a MySQL error, as follows:

#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 don't know enough about MySQL to figure the cause or any possible solution, apart from removing and re-installing the WAMPserver. But I did that recently when this problem first occurred (which was right after installing WAMP) and I'd prefer a more permanent fix if this is going to happen repeatedly.

I haven't really had a chance to do anything that might have screwed it up (as far as I know) and I just have a couple of CMS setups installed for testing. They are installed OK and still run OK, though I haven't started using them yet.
0

#2 User is offline   Peartree 

  • The one and only :)
  • PipPipPipPip
  • Group: Members
  • Posts: 974
  • Joined: 15-February 08
  • Reputation: 13
  • Gender:Male
  • Location:Sheffield & London
  • Experience:Advanced
  • Area of Expertise:Entrepreneur

Posted 22 August 2009 - 08:10 PM

Access denied means quite simply the user root has been disallowed access to the database - normally its if you have the wrong password set. The root user password for MySQL is usually left blank when you use sommet like WAMP.
0

#3 User is offline   Ade 

  • Dedicated Member
  • PipPip
  • Group: Members
  • Posts: 105
  • Joined: 22-February 09
  • Reputation: 1
  • Gender:Male
  • Location:UK
  • Experience:Advanced
  • Area of Expertise:Web Designer

Posted 22 August 2009 - 08:26 PM

Thanks for responding. I can see that it might be a password issue, but how can that affect an attempt to view the phpMyAdmin page? And how can it be fixed?
0

#4 User is offline   BenTheDesigner 

  • Dedicated Member
  • PipPip
  • Group: Members
  • Posts: 152
  • Joined: 22-September 09
  • Reputation: 20
  • Gender:Male
  • Location:Plymouth, Devon
  • Experience:Advanced
  • Area of Expertise:Web Designer

Posted 23 September 2009 - 09:44 AM

Hi Ade

It looks like a password has been set in MySQL for the root user, hence "(using password: NO)". This may not have been changed in your config.inc.php - I've just tried to replicate your problem and it gives me the same error. Do you remember setting a password for root inside PHPMyAdmin? If so, you want to open up config.inc.php and look for:

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

and set your password between the single quotes that are probably empty.

Let me know how you get on.

BenTheDesigner
0

#5 User is offline   extranetworld 

  • Forum Newcomer
  • Pip
  • Group: Members
  • Posts: 11
  • Joined: 29-November 10
  • Reputation: 0

Posted 29 November 2010 - 07:15 PM

View PostBenTheDesigner, on 23 September 2009 - 09:44 AM, said:

Hi Ade

It looks like a password has been set in MySQL for the root user, hence "(using password: NO)". This may not have been changed in your config.inc.php - I've just tried to replicate your problem and it gives me the same error. Do you remember setting a password for root inside PHPMyAdmin? If so, you want to open up config.inc.php and look for:

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

and set your password between the single quotes that are probably empty.

Let me know how you get on.

BenTheDesigner


Create a file named config.inc.php in phpmyadmin. Change blowfish secret, password and auth_type


<?php
// use here a value of your choice
$cfg['blowfish_secret'] = 'ba17c1ec07d61217';

$i = 0;
$i++;

// 'cookie' or 'http'
$cfg['Servers'][$i]['auth_type'] = 'cookie';

// or any existing user, change later to "pma"
$cfg['Servers'][$i]['controluser'] = 'root';

// with proper password
$cfg['Servers'][$i]['controlpass'] = '';
?>


Regards,
Puneet Verma
Extranet World
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users