peasepud Posted January 3, 2009 Share Posted January 3, 2009 Hi, I have just completed work on a content management system for the websites I develop. This CM works off a database and the links pages on each of the 9 sites log into that database to establish which links to display. Each of the 9 website owners can also log into the CM system via my main website to change the content displayed. This has worked fine in testing and I have been able to log in freely whenever required, I also had temporary versions of the links pages on all 9 sites working fine. Today I released the content to the live sites and it seemed to be working ok this morning however I have now found that none of the relevant pages seem to be working and the following error message is displayed: "Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'adultep_viewer'@'localhost' (using password: YES) in /home/websitename/public_html/phpfuncts_epdd.php on line 3 I cannot connect to the database because: Access denied for user 'adultep_viewer'@'localhost' (using password: YES)" Nothing has changed between the testing and live release with regards to database users or passwords. I have checked and the password is correct (I even created a new user and changed the details on one site to that users name and password but still received an error). Is it something to do with connections? there is nowhere in my code where I close the connection therefore Im wary that I may have overloaded the system with an excess of open connections across the 9 sites. If not, does anyone have any ideas of what could be wrong? ps I can access the database without problems by going through the phpMyadmin functions within my website account so Im confident the database itself is up and running. Any help would be gratefully received. Peter Quote Link to comment https://forums.phpfreaks.com/topic/139340-solved-mysql-connection-error/ Share on other sites More sharing options...
Mchl Posted January 3, 2009 Share Posted January 3, 2009 Check if the MySQL server is actually running at localhost. Quote Link to comment https://forums.phpfreaks.com/topic/139340-solved-mysql-connection-error/#findComment-728802 Share on other sites More sharing options...
peasepud Posted January 3, 2009 Author Share Posted January 3, 2009 Check if the MySQL server is actually running at localhost. Im able to access it through the phpMyAdmin via my Cpanel so it appears to be running. Ive realised your reply could be read two different ways so just in case thats not what you meant, all of the websites are on the same server and all normally connect to localhost (Like I say in testing, each of these pages worked correctly + now I cant even login through the actual site that the database is held on). Quote Link to comment https://forums.phpfreaks.com/topic/139340-solved-mysql-connection-error/#findComment-728812 Share on other sites More sharing options...
Mchl Posted January 3, 2009 Share Posted January 3, 2009 Yes. What I meant was, sometimes MySQL is on different server than Apache. Quote Link to comment https://forums.phpfreaks.com/topic/139340-solved-mysql-connection-error/#findComment-728815 Share on other sites More sharing options...
peasepud Posted January 3, 2009 Author Share Posted January 3, 2009 Thanks for your help, it appears that the password I was using wasnt the same as the one held for the database, strange that seeing as how I havent changed it and the login details are the same ones I was using this morning! Quote Link to comment https://forums.phpfreaks.com/topic/139340-solved-mysql-connection-error/#findComment-728857 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.