WordPress.org

Ready to get started?Download WordPress

Forums

Once more with feeling .... (2 posts)

  1. bgirardo
    Member
    Posted 2 years ago #

    OK ... I've got a LAMP instance (Ubuntu 11.10, Apache2, MySql 5.1 and PHP 5.3.6) ... I've opened MySql up so far I feel like I'd get a ticket downtown ...

    Anyhow - any new ideas on how to get past the dreaded "Database Not Found" 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 DB_HOST. This could mean your host's database server is down.

    Are you sure you have the correct username and password?
    Are you sure that you have typed the correct hostname?
    Are you sure that the database server is running?

    If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.

    I've tried 'user'@'127.0.0.1' and 'user'@'localhost'. I've verified passwords and mysql access by the 'user' using the 'password'.

    Any help anyone can supply would be appreciated!

    Thanks!

  2. ClaytonJames
    Member
    Posted 2 years ago #

    A quick suggestion: (if you have not already done this)

    sudo /usr/bin/mysql_secure_installation

    ...follow the prompts.

    Then to address the issue:

    For the sake of example, let's assume that you created a MySQL database for wordpress named "wordpress", and a MySQL user named "mike", and mikes MySQL password is "iam_mike", the config file will look like this:

    /** The name of the database for WordPress */
    define('DB_NAME', 'wordpress');
    
    /** MySQL database username */
    define('DB_USER', 'mike');
    
    /** MySQL database password */
    define('DB_PASSWORD', 'iam_mike');
    
    /** MySQL hostname */
    define('DB_HOST', 'localhost');

    That should be the long and the short of it.

Topic Closed

This topic has been closed to new replies.

About this Topic