Forum

Thread tagged as: Question, Error, Installation

Error: Could not connect to the database

I am running a test version of a site (using xampp) in order to figure out a strategy for employing perch to a legacy site.

It worked in the past (demo version) and now I have been given funds to buy the license which I have now done. I am getting errors after setting up database and user details. Database is populating in phpMyAdmin and I have checked the config file for any discrepancies but haven't noticed anything untoward.

I get stuck at:

Error: Could not connect to the database Please check that the access details specified in /medinedesign7_cms/perch/config/config.php file are correct.

Has anyone else had this issue? I am a bit of a beginner so it might be something very simple but there was nothing similar in the help section.

Many thanks

Jerry

Jerry Parsons

Jerry Parsons 0 points

  • 3 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

PHP is reporting that it can't connect to the database, so you need to check your setup, and database credentials.

Hi Rachel. Thanks for getting back to me. I have double checked credentials and all seems to be fine.

How can it write to the database and then encounter an issue. That doesn’t make sense to me.

Appreciate any more advise you may have at this stage.

Regards. Jerry

If it is the admin log in details that do not match then it also doesn’t make any sense as I have tried several times with new setup and new credentials. I have tried new downloads of perch and even reinstalled xampp.

If I edit the config.php file define password field from ‘db_password’ to ‘ ‘ then it takes me to the admin log in page but it says incorrect log in details. I have sent a request to reset password several times but not had any email response.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

The admin login details bear no relationship to your database details. You can't reset your password in Perch if you can't connect to the database.

Rachel Andrew said:

The admin login details bear no relationship to your database details. You can't reset your password in Perch if you can't connect to the database.

Hi Rachel,

I understand what you are saying about the admin section but what I don't get is that when I put in my credentials when setting up the database all is well and I can see the database that perch has pre-poluated but I can't get any further than :

Error: Could not connect to the database Please check that the access details specified in /medinedesign7_cms/perch/config/config.php file are correct.

Please help as it was working on a previous version a while ago when I showed the client and now they have paid me the £60 to get a licensed version and I am totally stuck.

Many thanks

Jerry

Hi Rachel,

I solved the problem by creating a new Database User and Database and it seems to have sorted the issue. Sorry to have taken up any of your time.

regards

Jerry