• Hi guys,

    I just migrated a couple sites to GoDaddy for a client and I’m running into the “Error connecting to database” issue with one of the sites. It is a WordPress site. I checked the wp-config.php file and it looks correct, and the database tables look correct too, but I’m still getting the message.

    Any Idea what else could generally cause this?

    Thanks,

    Pierre

Viewing 12 replies - 1 through 12 (of 12 total)
  • It pretty much describes the problem on the tin – WP can’t connect to the database. Try confirming all of the database details with the hosts.

    Thread Starter pierrescottdesign

    (@pierrescottdesign)

    I employed the direct solution to the problem as stated above but it was a no go. I’m rather new at migrating databases. Does anyone have an idea as to what could generally cause this?

    recheck database info in wp-config.php and Go Daddy does not use localhost use url as Db_host

    Thread Starter pierrescottdesign

    (@pierrescottdesign)

    thank you govpatel,

    I am currently trying to restore the database. Do i need to change the host url within the database itself? I changed the DB_Host to what it’s supposed to be but that did nothing.
    I’m so confused.

    Do i need to change the host url within the database itself?

    No. The database URL is not in the database, it’s only called in wp-config.php

    I changed the DB_Host to what it’s supposed to be

    Where exactly did you change this?

    Find the URL of the database server:
    https://support.godaddy.com/help/39/locating-your-databases-host-name

    Pierre,

    To answer your question about what would cause this error – it’s all about the four variables in that config file (database name, database username, password, host). As you’re probably aware, if any one of them isn’t exactly correct, it won’t connect.

    In my experience, if there’s a problem, it’s usually because the user doesn’t know to use the specified host address (instead of ‘localhost’) or he/she is using the wrong password. Keep in mind that the password for the database is unique – it’s not the same as your hosting account password (unless you made them match).

    If you’re not able to get this sorted out and you’re comfortable posting the domain name in this forum, I can take a look at your account to find exactly what’s going on. I’d then get an email out to you using the address on your account rather than posting account-specific info here.

    Alon
    [ Signature moderated. ]

    Thread Starter pierrescottdesign

    (@pierrescottdesign)

    Hi Alon,

    Thank you. I’d really appreciate your help. There are actually two domains, bookdivas.com and sinuatemedia.com, which are subdomains of Kremos.com, all owned by my client. I’d appreciate any feedback you have for this.

    Pierre

    Pierre,

    When I visit those sites, they successfully resolve. One is a Drupal site, the other a Joomla site. However, neither of them point to the same IP address as kremos.com.

    If they’re hosted as secondary domains to the kremos.com account, they should resolve to the same IP address. This would also explain why a change to the config file in the Go Daddy account doesn’t cause anything to change on the live site.

    Before troubleshooting any further, please be sure the DNS is setup the way you expect it to be. As always, if you’re not sure how to proceed or need assistance making that sort of change, our Support staff is available to assist. Contact info: https://x.co/irzD

    Alon
    [ Signature moderated. ]

    Thread Starter pierrescottdesign

    (@pierrescottdesign)

    Hi alon,

    I have not pointed the domain names yet because I wanted to test them first before making them on the new server to make sure it all works before I took it live. Is there a way to do so without pointing them, perhaps my plugging the ip address into the database?

    Yes, there is a way to access the site, but how have you been testing until now? You said that there were database connection errors, but I don’t know how you would have seen them if DNS wasn’t pointed and you didn’t have another way.

    The best way to work on the site before it goes live is to set the DNS manually on your local machine. In other words, override the DNS in the real world with something you setup just for you. You do this by modifying the ‘hosts’ file on your machine. We have instructions for how to do this in our Help Center: https://x.co/iuq1

    Just remember to change it back when you’re ready to go live or if you want to see the current site.

    Alon
    [ Signature moderated. ]

    Thread Starter pierrescottdesign

    (@pierrescottdesign)

    I haven’t tested yet, i’m still trying to get to the testing phase.

    I am migrating from another host that had Joomla installed for one of the sites. The new version of that site is in WordPress, and THAT version is the one hosted on godaddy. Sorry for not explaining that before. I’m scrapping the Joomla version entirely and it’s not on Godaddy at all.

    I just went in and set the nameservers for each site to Godaddy’s nameservers. I want them to point to the files hosted on Godaddy. When I look at the domain settings for each of the aforementioned domains, both of them have the same IP address as Kremos.com, which is the primary domain on the account. I have the hosting set up and all the files in their respective folders for each website. I tried to access sinuate media via kremos.com/sinuatemedia and got the error message, same with kremos.com/bookdivas. And when I go to Sinuatemedia.com or Bookdivas.com, it takes me to the old site. Why does this happen?

    Thank you Alon,

    Pierre

    Pierre,

    It looks like your nameserver changes worked as expected. I just visited both sites, and they’re resolving properly. SinuateMedia.com is showing a WordPress site without any errors. I’m pretty sure it’s working exactly as you want, which is great.

    The BookDivas.com site has a Drupal “page not found” error, but it’s seeing the right server. So, Drupal must be installed in the bookdivas folder. You can tell for sure by accessing the File Manager and looking at what’s in your bookdivas folder. If you’re not sure about it, call our Support staff to help.

    Note that you won’t need to access your sites using the kremos.com/sitename/ address. You can use SinuateMedia.com and BookDivas.com, just like they were hosted in their own accounts.

    Alon
    [ Signature moderated. ]

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Error Connecting to database’ is closed to new replies.