[resolved] Error establishing database connection (5 posts)

  1. skater8989
    Posted 4 years ago #

    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.

  2. esmi
    Forum Moderator
    Posted 4 years ago #

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

  3. Steven Schoch
    Posted 4 years ago #

    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.

  4. Steven Schoch
    Posted 4 years ago #

    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.

  5. Steven Schoch
    Posted 4 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic