Support » Installing WordPress » Error establishing database connection

  • Resolved skater8989


    I am using cpanel and I have followed the instructions exactly. I have no idea why it doesnt work. I have tried editing the config directly and through the wizard. nothing seems to work. Please help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • esmi


    Forum Moderator

    Contact your hosts for assistance with your database credentials. We can’t really help you with that here.

    I’m getting the same problem. I have a shell account with my web host. The database name works with the MySQL client program:

    mysql -hlocalhost -ustarnet_12 -p starnet_wordpress
    Enter password:
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 134549
    Server version: 5.0.91-log Source distribution
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

    These values (localhost, starnet_12, starnet_wordpress, and the password I pasted) don’t work in the wp-config.php file as they return the “Error establishing a database connection” page.

    Other database connections on that server work fine, using mysql_pconnect() calls.

    Here’s an update: Turning on WP_DEBUG gives this:

    Warning: mysql_connect() [function.mysql-connect]: mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD('your_existing_password'). This will store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords flag from your my.cnf file in ..../help/wp-includes/wp-db.php on line 1034

    I think we’re getting closer.

    I got my web server provider to enable secure password hashing. The problem is now solved!

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