WordPress.org

Ready to get started?Download WordPress

Forums

please help: always getting Error establishing a database connection (5 posts)

  1. tidot
    Member
    Posted 7 years ago #

    hello,

    I am new to this, maybe you could give me a hint:
    hoster: strato, germany. (first tried default settings, then switched to php 5.1.x)

    What i did:

    1. set up a mysql-db (via stratos "database-admin")

    2. filled in wp-config.php:
    database-name (given by strato)
    username (given by strato)
    host: "localhost"

    3. upload wordpress on server (root)
    4. going to http://www.../wp-admin/install.php

    always getting:

    "Error establishing a database connection

    This either means that the username and password information in your wp-config.php..."

    Any idea? Whats wrong? Thank you very much...
    Tidot

  2. Samuel B
    moderator
    Posted 7 years ago #

    That leaves your password is wrong or the connection isn't localhost.
    I'd bet it's not localhost. I install for install4free.wordpress.com and nearly all of the servers outside the US use something else.
    Check for it in your db admin or ask your host.
    Also, I've run into needing localhost:3306 - where 3306 is the port it connects on.

  3. Nnyan
    Member
    Posted 7 years ago #

    Only times that I've seen that error is if the U or P is incorrect. Others here may know other causes. Make sure your conf file matches this (with your info of course):

    define('DB_NAME', 'actual name here'); // The name of the database
    define('DB_USER', 'database name here'); // Your MySQL username
    define('DB_PASSWORD', 'database password here'); // ...and password
    define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value

    Also most times you create a user and DB you have to "assign" that user to the database (give him permissions to access the DB). I have no idea about your host but my host adds my host account name followed by an underscore in front of all database names and users. For example if I create a database called "wordpress" it actually gets created as:

    domainusername_wordpress

    Talk to your host about the error they should be able to tell you whats wrong.

  4. drmike
    Member
    Posted 7 years ago #

    Sometimes you have to put in the actual address for your server instead of leaving it as localhost. best bet would be to ask your host.

  5. tidot
    Member
    Posted 7 years ago #

    Thanks a lot!!!

    If anyone else has the same problem: instead of "localhost" fill in at all strato-standard-accounts: "rdbms.strato.de"

    Tidot

Topic Closed

This topic has been closed to new replies.

About this Topic