BarneyJoe Posted August 9, 2007 Share Posted August 9, 2007 Hope someone can help with this - it was working yesterday, so I know it's mostly all set up and working, but have just managed to screw some permissions somewhere. Basically I have (or had) a working database / website all working - it's on a local network rather than external hosting, using phpMyAdmin. I started setting up a new site yesterday, and - having not done it for a while - was having to rummage around checking the set up etc. ie the : $hostname_connDevelopments = "localhost"; $database_connDevelopments = "developments"; $username_connDevelopments = "root"; $password_connDevelopments = "[i]password[/i]"; Where I created the password in phpMyAdmin. When I finished yesterday I had managed to get a new website set up in Dreamweaver, a new database set up in phpMyAdmin, and the connection to database from DW. Database connects successfully in DW, pages uploaded can be browsed to correctly, so it all looks all present and correct. However, when I tried to browse to the old site this morning, I'm getting the following error in my browser : Warning: mysql_pconnect() [function.mysql-pconnect]: Access denied for user 'root'@'localhost' (using password: YES) in C:\wamp\www\Photolibrary\Connections\Photolibrary.php on line 9 Fatal error: Access denied for user 'root'@'localhost' (using password: YES) in C:\wamp\www\Photolibrary\Connections\Photolibrary.php on line 9 I've managed to fix this, by changing the password in the Photolibrary.php to the same as the one I created in the connDevelopments.php. (I originally thought they needed to be different.) However, the other problem is that I can no longer access phpMyAdmin, as I get the following error : 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. #1045 - Access denied for user 'root'@'localhost' (using password: YES) I'm presuming I changed a setting for access to phpMyAdmin yesterday when I thought I was creating a password for DW to connect to the database, rather than for me to log in to phpMyAdmin. Unhelpfully it just goes straight to that, so I don't have any opportunity to enter a password. Presumably I need to change something in my config.inc.php file - I've looked for anything to do with passwords, ie changing 'using password' from yes back to no, but with no joy. Sorry that got so lengthy, but hopefully it makes sense to someone and is just a small change I need to make...if I knew exactly where. Cheers. Quote Link to comment Share on other sites More sharing options...
BarneyJoe Posted August 9, 2007 Author Share Posted August 9, 2007 Got it - I created a new password for my new database, but didn't suss that it was the for the 'root' user, so in fact needs to be the same for each database - so I just had to change it from the old one for the first database to the new one I created (although presumably effectively changed, rather than created) in my config file. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.