aaPanel Database Connection Error Fix (MySQL / MariaDB)
Seeing:
❌ Error establishing database connection
❌ SQLSTATE[HY000]
❌ Database server not responding
Let’s fix it.
—
🚨 Common Causes
✔ MySQL/MariaDB stopped
✔ Wrong DB credentials
✔ Database deleted
✔ max_connections exceeded
✔ Disk full
—
✅ Fix Steps
—
🟢 1. Check If Database Is Running
Inside aaPanel → Database
Or via SSH:
$$
systemctl status mysqld
$$
If stopped:
$$
systemctl start mysqld
$$
—
🟢 2. Verify Credentials
Check config file (WordPress example):
$$
wp-config.php
$$
Verify:
$$
DB_NAME
DB_USER
DB_PASSWORD
DB_HOST
$$
—
🟢 3. Increase max_connections
Inside MySQL config:
$$
max_connections = 50
$$
Restart database.
—
🟢 4. Check Disk Space
Run:
$$
df -h
$$
If disk full → database fails.
—
🟢 5. Check Error Logs
$$
/www/server/data/*.err
$$
Logs reveal real problem.
—
🔥 Quick Fix Table
| Check | Status |
| DB running | ✅ |
| Credentials correct | ✅ |
| max_connections adjusted | ✅ |
| Disk space OK | ✅ |
#ErrorFix #MySQL #aaPanel #SSLError #DatabaseFix #PHPFix #VPS #WebHosting #ServerTroubleshooting