Forum
Perch could not connect to the database, local machine
Running PerchTest locally and get this message?
Error message
SQLSTATE[HY000] [2002] No such file or directory
Running PerchTest locally and get this message?
Error message
SQLSTATE[HY000] [2002] No such file or directory
Did you get a pass from the Perch Compatibility Test? If not that would be the first thing to try.
Hi Rachel,
I tried that and it failed. I have the following file structure for local development:
These are connecting to the perch database perfectly however all the links, css, js links aren't working as they're all relative etc. So I created a virtual host for each of the sites:
When I load in browser all the links and references to css, js files work but perch can't connect to the database?
Running the perchtest with url localhost/site1/perchtest does work but running with the same credentials using url site1.local/perchtest doesn't? And the message below is displayed:
Same files, same location, same db credentials?
I can't really advise on your local environment I'm afraid. If you are using something like MAMP etc. then you should ask them for help getting set up. Once you get the test to pass then Perch will install.
I've got Perch installed but when creating new pages links are pointing to the localhost root directory and not the virtual server. For example:
instead of
I'm basically trying to achieve the same setup you use in your demos.
Please post your Diagnostics Report.
You appear to be logged in at localhost:
https://localhost/site1/cms
I'd suggest creating vhosts but you will need to check with the Mamp documentation for how to do that.