Forum

Thread tagged as: Problem, Installation, Configuration

First time setup without database password

Whenever we install Perch using the first time setup on our local development without a password for the database user, Perch puts define("PERCH_DB_PASSWORD", '$db_password'); instead of define("PERCH_DB_PASSWORD", ''); into the config.php file.

This causes the perch setup script to not be able to login to the database and create the initial user account, so we always copy it from another working install of Perch. If we go in and remove the $db_password string and rerun setup, it still doesn't work and just overwrites it again with the same variable.

Is there a way around this?

Thank you in advance!

James Harrison

James Harrison 0 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

The best solution is to set a password. It's really not a great idea to be running a database server with no password.

We aren't really able to do that with our local environment, as we use too many other tools we would need to custom configure just for this one workaround. We will just continue copying and pasting the record at setup.

As an aside, you may want to update the help text in your setup page then if you aren't going to allow a blank password: Perch Setup Screenshot