• I’ve edited and uploaded wo-config with everything else. I use 1and1 hosting and so in my MySQL settings I set the following line:
    define(‘DB_HOST’, ‘db69.perfora.net’);

    When I went into wp-admin, I got the following error:

    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 db69.perfora.net

    The server *is* up and running, the password and username are correct, and I’m currently using MT on the same database.
    What have I done wrong?

Viewing 15 replies - 1 through 15 (of 17 total)
  • Have you tried https://db69.perfora.net ?

    Thread Starter fcader

    (@fcader)

    I just did and that doesn’t work either.

    Tried ‘localhost’ ?

    Thread Starter fcader

    (@fcader)

    Yup, I had it at the default values initially. Once that didn’t work, I fiddled around with db69.perfora.net.

    If we assume that the db69 connection is actually correct, then have you carefully stared at the other information ?
    No spaces ?
    No capitalisation problems ?

    Thread Starter fcader

    (@fcader)

    My password, username, and database name are correct for sure.
    db69.perfora.net is what is listed in my CP under “Host Name,” so I’m assuming that’s correct too.
    MySQL is not a strength of mine, but I do think I’ve got all this right.

    Thread Starter fcader

    (@fcader)

    Perhaps the fact that I am only allowed 1 database has something to do with it? It’s currently being used by MovableType.

    It’s no strength of mine either, I’ve just helped a few people through this ??

    Does your cpanel show any sort of ‘Connection String’ ?
    Have you created a new database ?

    Thread Starter fcader

    (@fcader)

    No, because I “have already used the available number of databases,” though I do have 98MB of space left.
    On the other hand, I am feeling destructive. I wouldn’t mind, too much, just deleting the present database and creating a new one.

    You don’t need a new database. You can use the same database, as WordPress will just add the required tables.

    Thread Starter fcader

    (@fcader)

    Fixed!
    I don’t know why, but this is how:
    1. I went into my CP and changed my database password.
    2. Deleted wp-config.php.
    3. Went to wp-admin/install.php, which ran the manual set up.
    Voila!
    Thanks everyone (:

    Thread Starter fcader

    (@fcader)

    On comparing the old and the new files, I discovered the problem.
    Aiyy caramba, I knew it’d be something stupid.
    What I’d done was:
    define(‘databasename’, ‘wordpress’);
    instead of:
    define(‘DB_NAME’, ‘databasename’);

    I know no PHP. But perhaps for other PHP novices, you might want to put in a word of advice?

    i have that error but that didn’t work

    i had the same problem [‘error establishing a database connection’] and i’ve changed ‘DB_HOST’, ‘localhost’ for ‘DB_HOST’, ‘127.0.0.1’ and… the problem seems to be fixed!

    … so this is the 1% chance i need to change this value! ;??)

    I tried both of those things and still nothing for me. Could it be because I’m running 10.4 tiger?

    The config file is right, as is the username (root) and password (I used the password to login to MySQL in terminal so I know it’s right)

    Tried changing DB_HOST to ‘localhost’ and ‘computername.local’ and ‘127.0.0.1’ and still same error.

    How do you change the MySQL password?

    Any ideas?

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Error establishing a database connection’ is closed to new replies.