WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Error establishing database connection (5 posts)

  1. skater8989
    Member
    Posted 1 year 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
    Theme Diva & Forum Moderator
    Posted 1 year ago #

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

  3. Steven Schoch
    Member
    Posted 1 year 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.
    
    mysql>

    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
    Member
    Posted 1 year 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
    Member
    Posted 1 year 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

Tags