Error establishing a database connection – Insecure authentication
-
Hello everybody,
i am trying to upload my localhost wordpress version on my website. Unfortunately i am getting an error saying “Error establishing a database connection“
However, i checked the db host, name, user and pw multiple times, and there shouldnt be any errors with that.
My error-log says, it has something to do with an insecure authentication and it suggets to manually set a new Password via MYSQL command. I tried this, but it didnt solve my problem.
My second try was deleting some code from thhe class-wpdb.php, cause error-log said, this could be an other issue.
if ( WP_DEBUG ) {
mysqli_real_connect( $this->dbh, $host, $this->dbuser, $this->dbpassword, null, $port, $socket, $client_flags );
} else {
// phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
@mysqli_real_connect( $this->dbh, $host, $this->dbuser, $this->dbpassword, null, $port, $socket, $client_flags );
}This caused many more errors, so i changed it back.
Any ideas, what i can do, to solve my problem? Thank you very much in advance!
Website: http://roland-rafael-repczuk.de
This is the error-log file:
[Fri Jan 27 09:20:44 2023] [fcgid:warn] [pid YYYY:tid XXXXXX] [client XXXXXX] mod_fcgid: stderr: PHP Warning: mysqli_real_connect(): (HY000/2000): 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 /XXXXX/wp-includes/class-wpdb.php on line 1775, referer: http://roland-rafael-repczuk.de/
-
Hi there!
It sounds like you’re having problems uploading a website created in local host, to a different server? We won’t be able to help with that, I’m afraid, as you’re not hosting your site with us.
To clear up any confusion, there is WordPress.com and WordPress.org, and they are two different entities.
We, WordPress.com, are a cloud-based platform where we manage WordPress sites, whereas WordPress.org is stand-alone software that you can download and self-host with any other hosting.
You can find more details about WordPress.com and WordPress.org on this page:
https://wordpress.com/go/website-building/wordpress-com-vs-wordpress-org/.
That said, if you were interested in hosting your site here, on WordPress.com, note that plan Business that you’d likely want to purchase, comes with 24/7 live chat support:
If you have any questions about what WordPress.com offers, let us know!
If you need help with moving to a different host, though, I’d probably ask at https://wordpress.org/support/forums/. Folks there will have more experience with self-hosted sites like yours.
I hope that helps :)
- The topic ‘Error establishing a database connection – Insecure authentication’ is closed to new replies.