website not working.
Error establishing a database connection.
1 Reply
jhartman
Linode Staff
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: