Cannot log in to the MySQL server mysqli::real_connect(): (HY000/2002): Connection refused


New Member
after installing a theme on my GCP OLS wordpress, im getting this error when trying to login to phpmyadmin

mysqli::real_connect(): (HY000/2002): Connection refused
and on wordpress im getting
Error establishing a database connection
how do i change phpmyadmin root password and restart mysql on OLS? Thank you



Install a theme shouldn't affect your DB access. Please check if your MariaDB service is still active.
Or did you migrate the site?



New Member
somehow after i installed the WP theme MariaDB has stopped working.
when i try to
sudo systemctl start mariadb.service
sudo systemctl restart mariadb.service
i get this error
Job for mariadb.service failed because a fatal signal was delivered causing the control process to dump core.
and when i check the status
sudo systemctl status mariadb.service
im getting this
● mariadb.service - MariaDB 10.4.13 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/mariadb.service.d
Active: activating (auto-restart) (Result: core-dump) since Sat 2020-08-29 13:51:23 UTC; 975ms>
Docs: man:mysqld(8)
Process: 2754250 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code>
Process: 2754257 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (cod>
Process: 2754259 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`cd>
Process: 2754406 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSI>
Main PID: 2754406 (code=dumped, signal=SEGV)
Status: "Starting final batch to recover 8 pages from redo log"

Aug 29 13:51:23 my-vm systemd[1]: mariadb.service: Main process exited, code=dumped, status=11/>
Aug 29 13:51:23 my-vm systemd[1]: mariadb.service: Failed with result 'core-dump'.
Aug 29 13:51:23 my-vm systemd[1]: Failed to start MariaDB 10.4.13 database server.