Forum

Thread tagged as: Problem, Installation, Configuration

perchtest succeeds, perch setup fails?

Not sure where to go from here...

I've moved to a new webhost and was running Perch Setup (first time with 2.5.1 for me), and got the message that it was unable to create tables, etc.

I quickly ran Perchtest and it succeed. So I ran it again, this time copying/pasting the access details straight off the brand new config.php that Perch had just created - success again. But, those same details seem to be causing failure during setup.

Frustratingly, my new webhost's control panel won't allow me to set (or even check), a db user's privileges - but surely if the test succeeds, then the privileges should be adequate to run Perch? Or could there be something else not happening correctly? Whatever it is, it'll be my fault for sure :o)

Jonathan Wilson

Jonathan Wilson 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

What message do you get?

"Creating database tables… Unable to create database tables.

The most likely cause is that your database access details aren't quite right. Please double check them. Note that some hosting control panel software (like cPanel) will prefix the database name with your account name. So if you created a new database called database_name the full name could be something like account_database_name

If you're still have trouble, it's possible that the MySQL user hasn't got enough access rights to create tables. Change this, if you can, then reload this page."

Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you see any tables created in your database?

Nope - I popped straight over into phpMyAdmin and it shows no tables.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you check the user permissions in phpMyAdmin?

Not sure if that's possible - or at least if it is, I've no idea how. phpMyAdmin appears to take you straight into the database without bothering about users.

Drew McLellan

Drew McLellan 2638 points
Perch Support

It could be disabled for you.

Did setup work in your dev environment?

Ok, I've found the real problem now - can't connect to the database (it seems that setup isn't presenting just quite the right error message when this happens?). Going in cold today, as opposed to working from the setup page yesterday, gives me the standard "Perch could not connect to the database" error.

Of course I'm still stuck, but at least it's not really a Perch problem anymore... Any ideas, though? A straight copy/paste of my webhost's MySQL server doesn't work (mysql4.openhost.net.nz:3306), and neither does localhost. The funny thing is, I've a client who's hosted with the same crowd and their Perch (v1.8.4) config.php uses that exact same server successfully. Surely this must come back to a permissions issue? I'm going to contact my webhost and find out about user permissions and how to check them.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Try mysql4.openhost.net.nz as the server - you shouldn't need that port number as it's the default for MySQL.

That fixed it, thanks so much.

Not that it matters any more now, but I'm still intrigued that both perchtest and Perch 1 function happily with that server:port... But never mind - I'm still as stoked as ever with Perch :o)

Drew McLellan

Drew McLellan 2638 points
Perch Support

Were you on the very latest test? Perch 1 used an older (now deprecated) way to connect to the database, and so it behaves differently.

Actually, that's a point - no, my test is a fairly old copy. It never occurred to me that the connection method may have changed over time. I'll grab the latest one now and stash it away.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

It's always a good idea to make sure you are running the latest version of the test rather than stashing away a copy, as otherwise you are going to be testing on something that doesn't reflect the latest Perch requirements.