Hi, I got this Error:
It is possible that the database is overloaded or otherwise not running properly.
The site administrator should also check that the database details have been correctly specified in config.php
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hey Ismail,
That message usually pops up when there’s a problem connecting to your database. It could be something as simple as a typo in your config.php
, double-check the database name, username, password, and host just to be safe.
Another common issue is that the database server itself isn’t running properly. If you’re on a Droplet, you can try restarting MySQL or PostgreSQL depending on what you’re using. And if your server is low on resources, it might be running out of connections, especially under load.
You can check the status of your database by running sudo systemctl status mysql
or sudo systemctl status postgresql
depending on what you’re using.
Another option is to move to a managed database service like DigitalOcean’s Managed Databases so you don’t have to worry about the database server itself:
If you’re not sure, feel free to share a bit more about your setup (what app you’re running, what kind of database, hosting details).
- Bobby
Heya,
Database server is down
Incorrect DB credentials in config.php
Too many open database connections
The database server is out of resources (RAM/CPU)
Database permissions or networking issues
Those are the possible causes of the problem you are seeing with the first 2 being the most common.
If you’re using MySQL or MariaDB, run:
sudo systemctl status mysql
# or
sudo systemctl status mariadb
If it’s not running, start it:
sudo systemctl start mysql
config.php
Open your app’s config.php
file:
nano /path/to/your/app/config.php
Look for:
$CFG->dbhost = 'localhost'; // or an IP address
$CFG->dbname = 'your_db_name';
$CFG->dbuser = 'your_db_user';
$CFG->dbpass = 'your_db_password';
Verify that:
Host is correct (often localhost
, but not always)
User and password are accurate
Database exists
Run this in the terminal:
mysql -u your_db_user -p your_db_name
Heya, @ismailjamil
If your disk is full, the database may crash or refuse connections. Run:
df -h
If usage is near 100%, you can clean up logs or unused files.
Also look at MySQL’s error log will give you the real reason why it’s not starting or failing connections:
sudo cat /var/log/mysql/error.log
Regards
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.