WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Newbie here - Error establishing a database connection (3 posts)

  1. RammPatricia
    Member
    Posted 2 years ago #

    Hi there!

    I would like to install the almighty and powerful WordPress, but still no luck.
    I googled a lot.
    So here is my problem: I already filled in the fields with correct data and without typos, but it still says: Error establishing a database connection.
    First I thought I have problem with the 'DB_HOST', 'localhost' but I contacted the support team and they said it's localhost.
    Maybe I do something wrong with prefixes? When I make a MYSQL database with the wizard in cpanel, every database has a prefix by default: "overmyst_" .

    My database name (whith prefix): overmyst_wordpress
    My username (whith prefix): overmyst_wpadmin

    Here is how my wp-config looks like:

    define('DB_NAME', 'overmyst_wordpress');
    define('DB_USER', 'overmyst_wpadmin');
    define('DB_PASSWORD', '---------------');
    define('DB_HOST', 'localhost');
    and I'm not sure about the prefix.
    $table_prefix = '';

    I've tried many combinations like 'DB_NAME', 'wordpress', so removing the prefixes from the username and DBname or $table_prefix = 'overmyst_'; etc...
    Can someone help me how to fill these fields to get my WordPress work?
    I'm sure I'm stupid but what can I do, I'm still a rookie in WordPress.

    To sum up:
    username: overmyst_wpadmin
    database: overmyst_wordpress
    "overmyst_" is a prefix I receive automatically.
    This will be my homepage, I've bought my domain+host at onebesthosting.com

    I've already installed Datalife Engine succesfully, but I would rather use WordPress because it's lightyears better for me and much more friendly.

    [ After only 1 hour and on a Sunday? Please do not bump, that's not permitted here. if it's that urgent then please consider hiring someone. ]

  2. s_ha_dum
    Member
    Posted 2 years ago #

    Your configuration looks correct, assuming you have the password right. (I wouldn't post the database name and user name though. That does constitute a security leak, just not one nearly as critical as revealing the password.)

    Your table prefix shouldn't matter. By default it will be 'wp_', but you can change it to something else and, for security, that is a good idea. I wouldn't set it to nothing though, as in your code above.

    Trying a bunch of combinations isn't going to help you. There are more possibilities than you could get to in a million lifetimes. You need to find the correct values, not guess at them.

    You created your database in PhpMyAdmin. You know what that is. Put that in for DB_NAME exactly as it reads in PhpMyAdmin, then leave it alone. You know what the user is. You can check by opening PhpMyAdmin, going to the mysql database, and checking the user table. Put that username in exactly as it reads. And leave it alone. Your host confirmed that 'localhost' is the correct DB_HOST. Leave that alone. The only thing left is your password. Are you absolutely sure that you have that right? uppercase/lowercase matters for all of these values.

  3. RammPatricia
    Member
    Posted 2 years ago #

    Thanks, I've succeeded.

Topic Closed

This topic has been closed to new replies.

About this Topic