bitnami / vms

Bitnami VMs
https://bitnami.com
Other
207 stars 43 forks source link

[Wordpress] Site is down. Wordpress unable to connect to MariaDB #1674

Open rkatepally opened 1 week ago

rkatepally commented 1 week ago

Platform

Azure

bndiagnostic ID know more about bndiagnostic ID

ef0f57ce-2431-c563-e0fd-235ab0181bee

bndiagnostic output

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

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

Couldnt find ways to reset the root password

Describe your issue as much as you can

when I log on wordpress admin console (http:///wp-admin.php), I get this message:

Warning: mysqli_real_connect(): (HY000/2002): Connection refused in /opt/bitnami/wordpress/wp-includes/class-wpdb.php on line 2035 Connection refused

Error establishing a database connection

This either means that the username and password information in your wp-config.php file is incorrect or that contact with the database server at 127.0.0.1:3306 could not be established. This could mean your host’s database server is down.

image

One of the biggest challenge, I am having is that it is not taking my root password at all. I tried to change it but it wont let me.

Also tried below command sudo /opt/bitnami/mariadb/bin/mysqld_safe --skip-grant-tables --skip-networking 2> /dev/null &

but wont let me to change the password for root or bn_wordpress user. I repaired the tables by enabling skip-grant-tables, seemed to fix some table, unsure if my mariaDB database is corrupted, please suggest me alternative options to resolve it.

rkatepally commented 1 week ago

Hi @gongomgra - Can you please comment on my issue ?

Is there a possibility that the mariaDB is corrupted ? I remembered setting this up as MySQL DB server, not sure if the automatic upgrade broke it.

Are there any troubleshooting options would you suggest me ?

Is there anyone else who can help me with this issue ?

gongomgra commented 6 days ago

Hi @rkatepally,

Thanks for using Bitnami. According to the bndiagnostic information you shared, there is a MariaDB process running on your machine with the --user=mysql --skip-grant-tables --skip-networking flags. Did you manually start it? I also see the next error messages in the MariaDB logs at /opt/bitnami/mariadb/logs/mysqld.log. You will have to fix them in order for the service to be started

Version: '11.1.2-MariaDB'  socket: '/opt/bitnami/mariadb/tmp/mysql.sock'  port: 0  Source distribution
2024-10-07  2:54:14 4 [ERROR] mysqld: Table './bitnami_wordpress/wp_actionscheduler_actions' is marked as crashed and should be repaired
2024-10-07  2:54:14 4 [Warning] Checking table:   './bitnami_wordpress/wp_actionscheduler_actions'
2024-10-07  2:54:14 4 [ERROR] mysqld: Table './bitnami_wordpress/wp_actionscheduler_groups' is marked as crashed and should be repaired
2024-10-07  2:54:14 4 [Warning] Checking table:   './bitnami_wordpress/wp_actionscheduler_groups'
2024-10-07  2:54:14 4 [ERROR] mysqld: Table './bitnami_wordpress/wp_actionscheduler_logs' is marked as crashed and should be repaired
2024-10-07  2:54:14 4 [Warning] Checking table:   './bitnami_wordpress/wp_actionscheduler_logs'
2024-10-07  2:54:14 4 [ERROR] mysqld: Table './bitnami_wordpress/wp_wpforms_tasks_meta' is marked as crashed and should be repaired
2024-10-07  2:54:14 4 [Warning] Checking table:   './bitnami_wordpress/wp_wpforms_tasks_meta'