I've been trying to get a quick staging environment setup on GoDaddy all day.

By using die('foo') I can tell that GoDaddy is able to reach all of my files (public/index.php, craft/config/db.php and general.php). I have created two different databases and users to try to connect to. I am also using the hostname's generated by GoDaddy.

However, even with the correct db information and knowing for a fact that Craft is able to find my db.php file, when I browser to mydomain.com/index.php?p=admin/install I'm still receiving the following error:

Craft can’t connect to the database with the credentials in craft/config/db.php.


 * Database Configuration
 * All of your system's database configuration settings go in here.
 * You can see a list of the default settings in craft/app/etc/config/defaults/db.php

// die('foo');

return array(

    // The database server name or IP address. Usually this is 'localhost' or ''.
    'server' => 'dbhost',

    // The name of the database to select.
    'database' => 'dbname',

    // The database username to connect with.
    'user' => '***',

    // The database password to connect with.
    'password' => '***',

    // The prefix to use when naming tables. This can be no more than 5 characters.
    'tablePrefix' => 'craft',

  • Omit the user and password, and post the rest of your db.php into your question.
    – Lindsey D
    Oct 28, 2016 at 19:36
  • Are dbhost and dbname the actual values, or just placeholders? Obviously those won't work. :)
    – Lindsey D
    Oct 28, 2016 at 19:49
  • Haha, yes, placeholders. The database "server" supposedly does not work as localhost on Godaddy. See Mark's answer here: craftcms.stackexchange.com/a/10543/5471 Oct 28, 2016 at 19:51
  • Lol, yeah... GoDaddy is weird about that. That would have been my guess though.
    – Lindsey D
    Oct 28, 2016 at 19:52
  • Can you connect using those credentials through a MySQL client?
    – Brad Bell
    Oct 28, 2016 at 20:56


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.