website not working.

Error establishing a database connection.

1 Reply

This type of message generally indicates that your webserver application is unable to communicate with the corresponding database. If you have recently rebooted, it's possible that your database application did not automatically start on-boot or logged an error that prevented it from properly starting.

In order to troubleshoot the status of your database, start or restart it if necessary, or set it to automatically start on-boot, you can use the following command syntax:

  • Check the status of the Application/Service:
sudo systemctl status $APPLICATION
  • Start or Restart your Application/Service:
sudo systemctl start $APPLICATION


sudo systemctl restart $APPLICATION
  • Stop your Application/Service:
sudo systemctl stop $APPLICATION
  • Enable your Application/Service to automatically start after a reboot:
sudo systemctl enable $APPLICATION
  • Check the system error logs for the specific Application/Service:
journalctl -xe

You may also want to review the following Community posts that go into more detail about troubleshooting after maintenance and issues with databases in general.

Maintenance Issues:

Troubleshooting Databases:


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct