Forum

Thread tagged as: Question, Configuration, Hosting

running perch on 2nd local server

I loaded my local site onto a 2nd (laptop) computer in order to show a client the progress but I couldn't get perch to connect to DB. I ran compatibility test - worked. All the settings (password, DB name, etc) are the same. I'm using MAMP Pro as server. I tried re-setting the site... but it still will not work.

Do you restrict the use of a license to one machine?

ruth tait

ruth tait 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

What error are you getting?

It tells me my password and username are incorrect.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Then that's most likely the issue. Have you tried resetting the password?

yes. Several times. The password I'm entering is the same as on my other machine. It's also the password listed in the config.php file. It's the same password/username in setup, which I redid by downloading another perch folder. Could it be a problem with MAMP? There's been an upgrade.

Here is a link to screenshot I've rechecked config.php; all seems fine vis. password, etc. Do you want me to send this privately?

https://artbyrt.com/rt/ScreenShot14Jul14.5.30.png

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, so that's not saying the password is incorrect at all. Can you turn debug on?

Sorry but I'm not sure what you mean. How/where do I turn on debug?

Rachel Andrew

Rachel Andrew 394 points
Perch Support

okay. I've put in the php debug lines. Message is pretty clear: can't connect to DB. Here's a readout of what came in on my footer include file (which actually still went ahead and included the html)

Images are copyright Janice Tait; use except by permission is prohibitted; WEBMASTER artbyrt[at]gmail.com

(code) DIAGNOSTICS: Could not create DB link! SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'janicetaitlocal' (61) Could not create DB link! SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'janicetaitlocal' (61) SELECT regionKey, regionHTML FROM perch2_content_regions WHERE regionPage= OR regionPage= ORDER BY regionPage DESC Could not create DB link! SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'janicetaitlocal' (61) Could not create DB link! SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'janicetaitlocal' (61) SELECT pageID FROM perch2_pages WHERE pagePath= LIMIT 1 Could not create DB link! SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'janicetaitlocal' (61) Could not create DB link! SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'janicetaitlocal' (61) Could not create DB link! SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'janicetaitlocal' (61) Could not create DB link! SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'janicetaitlocal' (61) Could not create DB link! SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'janicetaitlocal' (61) Could not create DB link! SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'janicetaitlocal' (61) Could not create DB link! SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'janicetaitlocal' (61) Could not create DB link! SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'janicetaitlocal' (61) Could not create DB link! SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'janicetaitlocal' (61) INSERT INTO perch2_pages(pagePath,pageTitle,pageNavText,pageNew,pageDepth,pageModified,pageAttributes) SELECT AS pagePath, AS pageTitle, AS pageNavText, AS pageNew, AS pageDepth, AS pageModified, AS pageAttributes FROM (SELECT 1) AS ptable WHERE ( SELECT COUNT(*) FROM perch2_pages WHERE pagePath= )=0 LIMIT 1 Could not create DB link! SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'janicetaitlocal' (61)

what does it mean?

Rachel Andrew

Rachel Andrew 394 points
Perch Support

There is an issue connecting to the database, this is nothing to do with the password in Perch. It's not getting that far - that error is from MySQL not Perch.

Hi Ruth

I'd suggest having a search for the error you're getting along with the local server software you are using e.g. "SQLSTATE[HY000] [2003] Can't connect to MySQL" mamp pro.

It could be an issue with another program using the ports Mamp is trying to use or something else with the Mamp configuration on your machine.

I've followed advice above and have changed MySQL port as well a network setting inside MAMP which has now stopped the above message. However, I still cannot connect to perch db. Here is screenshot of new message:

https://www.artbyrt.com/rt/ScreenShot-19Jul14.png

I don't have enough knowledge of the phpMyAdmin to figure out whether there is some setting blocking my access. When MAMP starts up it verifies the password and username as correct. Perch config file also verifies them but will not connect.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

That message is because you are using an incorrect username and password to log into Perch, nothing to do with the database.

The username and password to use here are your Perch login details. Not the database details.

Now I'm really confused. If I've set up a db login and password in the setup protocol, why am I using my perch un and pw? How are files entered into the database? What is the password and login in the config.php pointing to?

Sorry, .... I'm somewhat of a learner driver here. Just beginning to try to understand php.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Perch needs to connect to your database. This uses the database username and password.

Then you log into Perch, using the Perch admin username and password you created setting up Perch.

These two are unrelated.

okay. Thanks for confirming this. Much appreciated (you're working late!)