WordPress Error with DB Connection; login to phpMyAdmin gives mysqli::real_connect(): (HY000/2002): Connection refused

Keywords: WordPress - Google Cloud Platform - Technical issue - Services (Apache, MariaDB, MySQL…)

bndiagnostic ID: 295eae59-7e6f-547e-99b2-f9eebe23965e

bndiagnostic output:

? Processes: Found possible issues
? Apache: Found possible issues
? Resources: Found possible issues

bndiagnostic failure reason: I do not know how to perform the changes explained in the documentation

Hello, I was updating a plugin on my WordPress site and received an email from JetPack saying that my site is down. Since then, I am receiving the error message “Error Establishing Database Connection; Error 3306” and have not been able to get into the site.

Here are some things I have tried:

  1. Repair WordPress database by adding the ‘define(‘WP_ALLOW_REPAIR’, true);’ to the wp-config.php by FTP using FileZilla. However, I could not access the file due to some permission errors. Then, I successfully accessed and modified the file and added the line by SSH through GCP, but this did not change the error message when I went to http://www.yoursite.com/wp-admin/maint/repair.php. (With yoursite changed to my site name). I have removed the line of code and reverted it to how it was originally.

  2. Tried accessing the phpMyAdmin to see if the error was the connection with MySQL. After accessing the phpMyAdmin and entering the correct credentials, I received the error message “mysqli::real_connect(): (HY000/2002): Connection refused”.

As additional background, the site has gone down a few times previously for 1-2hrs when I’ve updated plugins (the plugins update successfully).

Hi @alissa_h,

It seems there is a problem in the database and it can’t be started (/opt/bitnami/mariadb/logs/mysqld.log)

2022-01-12 19:58:41 0 [Note] InnoDB: Completed initialization of buffer pool
2022-01-12 19:58:41 0x7fd5c2048f40  InnoDB: Assertion failure in file /bitnami/blacksmith-sandox/mariadb-10.3.29/storage/innobase/os/os0thread.cc line 140
InnoDB: Failing assertion: ret == 0
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to https://jira.mariadb.org/
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: https://mariadb.com/kb/en/library/innodb-recovery-modes/
InnoDB: about forcing recovery.
220112 19:58:41 [ERROR] mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.

To report this bug, see https://mariadb.com/kb/en/reporting-bugs

We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

Could you please report this issue to the MariaDB’s team as the log suggest to get more information about the error and how to troubleshoot it?


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.