4

My site won't show up (white screen of death). When I try to access the control panel, I am setting this error:

A Database Error Occurred
Unable to connect to your database server using the provided settings.
Filename: core/EE_Config.php
Line Number: 207

1 Answer 1

12

Broadly speaking, as the error says, you are not connecting to your database. So, check to make sure everything is "plugged in" properly.

Things to check:

/expressionengine/config/database.php
- file exists
- triple check you are using the correct database info for your current server/environment (host, username, password, and database name)
- file has proper permissions (chmod 666)
- /config/config.php is setup properly and with proper permissions (chmod 666)

Run a connection test

In /system/expressionengine/utilities there's a file called dbtest.php. Fill out the top 4 variables and place it at your web root directory so you can view it online (eg, http://mysite.com/dbtest.php). The result should prove helpful.

If you see "Unable to select your database" make sure the database actually exists on the server and that the user has permission to access that specific database.

If you are still "Unable to connect to your database server," you'll have to dig deeper.

Still unable to connect to server

If you are running locally, it may have to do with where your MySQL is installed. Check this out.

If you are on a server (especially a shared server), check with your hosting provider. They may be experiencing a temporary outage or be able to help you find a solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.