Warning: mysql_pconnect(): Access denied

0 votes
656 views
asked Oct 30, 2015 in Computers & IT by Abdul Wahab

While searching from a form on my website to see some data, I got the following error message: 

Warning: mysql_pconnect(): Access denied for user 'example_root'@'localhost' (using password: YES) in public_html/myfolder/opendatabase.php on line 25

What is the problem while it was working fine for many month. Still all pages on my website is working fine except this php form.

However, in last week some disk was changed on my hosting server due to some error at hosting company end.  

1 Answer

0 votes
answered Nov 2, 2015 by Muhammad Qasim

This problem may arise when server was recovered after some hard disk crashing as during this restoration process, the original password may be cleared / blanked in the database user. 

You can login to the CPanel of your website or localhost (if working on local system). Then go to the Database area and click on "MySQL Databases".

Here, you will see all the database users, select your user and set the old password or have a new password and then change it in your opendatabase.php file also.

In some cases , if more databases and multiple users exist then assign specific user to the required database also after setting the password. 

Hopefully, it is will you as I got the same problem and solve in the same manner mentioned above. 

Welcome to Ask Questions & Get Answers, where you can ask questions and receive answers from other members of the community. You know Google Answers has been retired, and is no longer accepting new questions but we are.
...