Unable to resolve “Error establishing a database connection” error.

[ad_1]

First off, thanks in advance for any and all help.

A little background, I’m running the latest build of WordPress and MySQL containers in Unraid. The site has been running flawlessly for the better half of a year.

When I try to access my site’s wp-login.php page I get “Error establishing a database connection”. I can access the frontend fine but nothing in the backend.

I’ve confirmed that wp-config.php has the correct DB name, username, and password. I’ve confirmed this (I think) by using the MySQL console and logging in with the same credentials as the config file.

I’ve tried adding “define(‘WP\_ALLOW\_REPAIR’, true);” to the config file and navigating to [http://www.yoursite.com/wp-admin/maint/repair.php]) with the same error (I changed the domain name to the appropriate one).

I’ve tried disabling plugins and themes (by renaming the original folders to something else).I’ve tried copying a fresh WordPress file structure over my existing one (with the exception of the content folder and config file).

Two things have stood out to me in my troubleshooting:

1. Looking at the MySQL logs, this error is present

​

2023-05-17T03:22:24.947268Z 0 [ERROR] [MY-000059] [Server] SSL error: Unable to get private key from ‘server-key.pem’.
2023-05-17T03:22:24.947290Z 0 [Warning] [MY-013595] [Server] Failed to initialize TLS for channel: mysql_main. See below for the description of exact issue.
2023-05-17T03:22:24.947297Z 0 [Warning] [MY-010069] [Server] Failed to set up SSL because of the following SSL library error: Unable to get private key

I’m wondering if the lack of the private key is preventing WordPress from connecting the the MySQL database?

2. Through the MySQL console, I can select the WordPress database, but when I “show tables;”, I get the following return: “Empty set (0.01 sec)”. I don’t know what should show up, but I’m a little concerned there’s no tables in the WordPress database.

Can anyone point me in the right direction? I’m out of my depth at this point.

Thanks again!

[ad_2]
1 Comment
  1. It seems your database was deleted. Do you see any content in the front end? Did your installation feature elementor? I’ve had massive problems with script kiddies exploiting the latest bug on unsafe/outdate websites of my customers.
    What you describe is the exact behavior I get when transfering wp to another host before restoring the database tables.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer