0

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.

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 '127.0.0.1'.
    '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',

);
Brad Bell
  • 67,440
  • 6
  • 73
  • 143
Steven Thate
  • 687
  • 4
  • 20
  • Omit the user and password, and post the rest of your db.php into your question. – Lindsey D Oct 28 '16 at 19:36
  • Are dbhost and dbname the actual values, or just placeholders? Obviously those won't work. :) – Lindsey D Oct 28 '16 at 19:49
  • Haha, yes, placeholders. The database "server" supposedly does not work as localhost on Godaddy. See Mark's answer here: http://craftcms.stackexchange.com/a/10543/5471 – Steven Thate Oct 28 '16 at 19:51
  • Lol, yeah... GoDaddy is weird about that. That would have been my guess though. – Lindsey D Oct 28 '16 at 19:52
  • Can you connect using those credentials through a MySQL client? – Brad Bell Oct 28 '16 at 20:56
  • Yes, sorry I should have mentioned that. I am able to connect via phpMyAdmin with the same credentials I am using in db.php – Steven Thate Oct 28 '16 at 20:58
  • I'm still not certain why GoDaddy can't connect to the database for Craft, but I started a trial at Cloudways. I was able to get everything up and running with them. It has to be a user (ie, me!) error at GoDaddy somewhere... but oh well. It's a good excuse to use something other than GoDaddy! :) – Steven Thate Nov 02 '16 at 13:27

0 Answers0