Database connection error

If you ever get the “Error establishing connection to database.” or “Cannot connect to database.” there could be some possible reasons.

1. Check if MySQL is running

Login to your hosting panel using “admin” user.

http://your_server_ip:8083

Check if the database server (MySQL) is running. If not then start/restart.

server > MySQL > start/restart

IF MySQL does not start/restart

Check if your disk is full.

server > show: CPU/ MEM / NET / DISK

Select “DISK”

2. Check if your database details are correct.

Download your database config file from FTP.

eg. WordPress

/web/yourdomain.com/public_html/wp-config.php

You can edit the password from the hosting panel.

user > webuser > login as webuser > db > your_db > edit

Type the password then save.