bitnami / vms

Bitnami VMs
https://bitnami.com
Other
206 stars 44 forks source link

[Wordpress] Error establishing a database connection #1660

Closed pashaUSA closed 3 weeks ago

pashaUSA commented 1 month ago

Platform

Google Cloud Platform

bndiagnostic ID know more about bndiagnostic ID

24fc685f-0adb-9551-ac02-ed87420883ed

bndiagnostic output

✓ Php: No issues found ✓ Resources: No issues found ? Apache: Found possible issues ? Mariadb: Found possible issues ✓ Processes: No issues found ✓ Wordpress: No issues found ? Connectivity: Found possible issues

bndiagnostic was not useful. Could you please tell us why?

did run all the way

Describe your issue as much as you can

The site decided to lose its connection to the DB. some commands and results that I run:

sudo /opt/bitnami/ctlscript.sh status mysql
Cannot find any running daemon to contact. If it is running, make sure you are pointing to the right pid file (/var/run/gonit.pid)
sudo /opt/bitnami/ctlscript.sh start mysql
Failed to start mysql: Cannot find check with id mysql
sudo tail -n 100 /opt/bitnami/mysql/logs/mysqld.log
tail: cannot open '/opt/bitnami/mysql/logs/mysqld.log' for reading: No such file or directory
$ cd mysql/
ls -l
total 12
drwxrwxr-x 2 root root 4096 Apr  1 15:37 bin
drwxr-xr-x 2 root root 4096 Jan  1  1970 licenses
drwxr-xr-x 3 root root 4096 Jan  1  1970 plugin

Maybe MySQL needs to be reinstalled?

pashaUSA commented 1 month ago

thanks to chatGPT, the problem was in 2024-09-20 6:31:20 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. To check

sudo /opt/bitnami/ctlscript.sh status
apache already running
mariadb not running
php-fpm already running
sudo tail -n 100 /opt/bitnami/mariadb/logs/mysqld.log
2024-09-20  6:31:20 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

sudo nano /opt/bitnami/mariadb/conf/my.cnf add

[mysqld]
innodb_force_recovery = 1

sudo /opt/bitnami/ctlscript.sh start mariadb

sudo /opt/bitnami/ctlscript.sh status
apache already running
mariadb already running
php-fpm already running
jotamartos commented 1 month ago

I'm glad to hear that you managed to solve the issue and thanks for posting the steps here, that information will be useful for others 😄

github-actions[bot] commented 1 month ago

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

github-actions[bot] commented 3 weeks ago

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.