Support » Installing WordPress » Please help-Error establishing a database connection –

  • Are you sure you have the correct username and password? Yes
    Are you sure that you have typed the correct hostname?
    Are you sure that the database server is running?
    How do I check this?…I see the database in cpanel

Viewing 8 replies - 1 through 8 (of 8 total)
  • Jeremy Clark



    look in your wp-config.php file and verify that information matches with the database information.

    It does..I successfully installed it on another linux server but not for the one I need it on.

    The blog exists but the tables can’t be created.
    When I go into phpadmin under has “No Privileges” written in red

    Create new database:
    No Privileges

    Could this have anything to do with it?
    The server uses cPanel X v2.6.0


    Most times a cPanel hosted site will not allow a database to be created in phpMyAdmin.

    The database, the database user (along with password), and the assignment of database rights for a user are defined in a cPanel menu.

    So either the information you have in wp-config.php is wrong or has a space in front of or after a value (‘ localhost’ should be ‘localhost’) or the database server is down (unlikely).

    Hosts rarely let anybody to create DB in phpMyadmin. That’s pretty standard.
    You create a DB from the site’s/host’s admin panel (cPanel in your case!). Then (if necessary) edit it with the phpMyadmin.

    Did you create a database and did you add a user to it before attempting to install?

    Thanks for your help

    I created db, then UN/PW, then added username to database in cpanel (not phpadmin)
    It’s a dedicated linux server.

    The info in wp-config is correct.

    I had success installing the same blog files on another server (with cpanel)..the script ran successfully.

    Please advise

    My wp-config file:

    // ** MySQL settings ** //
    define(‘DB_NAME’, ‘home_blog’); // The name of the database
    define(‘DB_USER’, ‘home_lenn’); // Your MySQL username
    define(‘DB_PASSWORD’, ‘password’); // …and password
    define(‘DB_HOST’, ‘localhost’); // 99% chance you won’t need to change this value
    define(‘DB_CHARSET’, ‘utf8’);
    define(‘DB_COLLATE’, ”);

    Is your “username” on that server (hosting package) “home”? I mean, logging into the cPanel do you use that username?

    Resolved..the server guys said it was something to do with having old mySQL databases on the updated.

    I knew it wan’t me:-)

    Thanks very much for checking.

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