Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie Help - phpMYAdmin Password Help 2

Status
Not open for further replies.

coldfused

Technical User
Jan 27, 2001
2,442
US
Ok I'm on mac os x and I installed mySQL and phpMYAdmin no problem, everything was working fine.

When I browsed to everything was working fine at first but there was a red message at the botttom of the page telling me that it wasnt secure and needed to be fixed, I was guessing bacause I had not set a username and password for the phpMyAdmin. So clicking on the privileges link I proceeded to put in a password for the users there which was basically me at my local machine, or whatever that was.

Now when I go back to I get this error:

Code:
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in config.inc.php and make sure that they correspond to the information given by the administrator of the MySQL server.
Error

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

Any help is appreciated.

Carl

----------------------------------------
Florida Web Design
Orlando Web Hosting
Florida Coldfusion Hosting
 
When you setup MySQL there is just one user in there, 'root' with no password. PMA recognizes that and you got the the warning message.

When you changed the root password that was registered in the MySQL user table. However, the PMA configuration file still has no value set for the password.
Find the config.inc.php and set the appropriate password to get access to MySQL again.

Then - this is what I recommend:
1. Create a new user that has access through PHP admin that is not 'root'.
2. Give that user only the access privileges that you require from the web. You may give that user different levels of privileges coming from different hosts.
For example, you could give full superadmin privs only from localhost.

Sometimes people misunderstand the 'user' business with MySQL. It does not reflect at all who is accessing the PHP part, i.e. PMA. It is as what entity the PHP connects to the MySQL server. That will always be a fixed setup user, in the sense that it is a service user that accesses the resource MySQL.

 
... put in a password for the users there which was basically me at my local machine, or whatever that was ..."

That's kind of important. Edit your config.inc.php and check that the password for "root" there is the same as the one for root in MySQL.

 
Add the password to this line?

Code:
$cfg['Servers'][$i]['auth_type']     = 'config';    // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i]['user']          = 'root';      // MySQL user
[b]$cfg['Servers'][$i]['password']      = '';          // MySQL password (only needed[/b]

----------------------------------------
Florida Web Design
Orlando Web Hosting
Florida Coldfusion Hosting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top