• Resolved apathic

    (@apathic)


    This is my first time trying to install WordPress, so I can’t say I’m surprised it’s not going smoothly.
    I’m stuck at the very start of the installation:
    http://mywebsite.com/wp-admin/install.php

    The message I see reads:

    “Error establishing a database connection
    This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at localhost. This could mean your host’s database server is down.”

    The username and password are fine. I’ve checked literally hundreds of times.

    I tried writing both “localhost” and the actual IP as the hostname (not at the same time, of course). Neither work. Is there something else I should try here?
    Is there another reason for WordPress to not be able to contact the server?

    Please help. I’m a total newb 🙁

Viewing 9 replies - 1 through 9 (of 9 total)
  • Your web host should provide you with the correct login information. It should be as simple as filling in the data. Maybe there is a typo in there somewhere. If you edited wp-config with a word processor like MSWord there might be a hidden control character, but that usually results in a different error. You are sure you have a MySQL server, right? Not MSSQL or some other variant?

    Thread Starter apathic

    (@apathic)

    Thanks for the reply apljdi!

    There is no tyop (I’ve checked a hundred times). I also didn’t meddle with the file and changed things recklessly.
    I didn’t edit it in Word. I used notepad.
    My database is indeed MySQL (I actually had to check it just now to make sure, though. ha ha I’m so clueless).

    Why does WordPress hate me so?

    See the following video for how to troubleshoot that error.

    [link moderated]

    Make sure that the database user has all required privileges to perform operation (insert, delete, modify etc.) on database. If all your MySQL settings are correct then I suggest you to contact your host regarding this matter. They will be in better position to assist you further in this regard.

    Thread Starter apathic

    (@apathic)

    figaro – After watching the video I checked database/user/password/host again to make sure. They’re all fine. I guess that’s not the problem, then.

    Kailash1 – How do I give my user privileges? The only options I have are to delete a user or to match a user with a database.
    I stumbled upon a tutorial that mentioned doing that with phpMyAdmin so I tried that myself, but I don’t have “privileges” in there. I just don’t. Also, the database looks completely blank. I mean, there are no tables at all. It’s empty. Is that bad?

    How do I give my user privileges?

    You might not be able to. Your web host could give your user those privileges though, and it sounds like they need to.

    When you say you can ‘match a user with a database’ what database can you match the user to? And have you done so? It may be that you need to connect your user with the DB assigned to you, for some odd reason. If that doesn’t work, this is definitely something that you need to contact your host about. Based on your description, it sounds like you have a database that is effectively unusable due to the privileges given your user.

    Thread Starter apathic

    (@apathic)

    The database and user I created are connected.

    The problem is the privileges, then?

    Based on this conversation, yes, it looks like the problem might be the user privileges. WP needs to create about about ten tables and then of course, it needs to be able to edit them. I’m not sure your MySQL user has that ability. However, if you are still getting a ‘cannot connect‘ error, that might point to an even more fundamental problem than privileges. Either way, it looks like your web-host is going to have to sort this out for you. Contact your host’s support people.

    Thread Starter apathic

    (@apathic)

    I’ll do that right away.
    Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘can’t contact database server’ is closed to new replies.