Urgent Assistance: Error establishing a database connection

1

Hi staff, Can you please assist me with my website http://braindocacademy.com.au/ I had stopped and started the instance, and right after starting it, it said "Error establishing a database connection." I have no clue why, because it could load before I started it. It is built on Wordpress Bitnami Lightsail. It would mean a lot if you can help me. Thanks for reading and really appreciate your time, Carl

Carl
asked a year ago313 views
1 Answer
1

Hi,

Most likely the database has not started after instances stop / start (assuming you are not using RDS for database). Check if the database is running with this command. From the output of the command you should have a line for mariadb / mysql

sudo systemctl status bitnami

If mysql or mariadb is not listed, and other services like php / httpd are shown, you can try to restart the service

sudo systemctl restart bitnami

For mysql startup failures (if any) you can also check /opt/bitnami/mariadb/logs/mysqld.log

--Syd

profile picture
Syd
answered a year ago
  • Hi, thanks for your response Syd :)) I think actually I'm using Linux for database. With bitnami lightsail, Any tips for that? Appreciate your time!! Carl

  • Carl, the latest version of Lightsail's Bitnami Wordpress is using mariadb running on the same instance as your apache/php/wordpress stack. I think Syd's suggestion is a good one. Have you tried it?

  • Carl, The steps I mentioned should help

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions