Linux & VPS

Fix MySQL / MariaDB Won't Start

Job for mariadb.service failedFailed to start MySQLcan't connect to local MySQL server
6 min read Updated 12 June 2026 ESAGAMES Team

When MySQL/MariaDB won't start, the service status is vague but the error log is precise. Here's how to read it and fix the usual causes.

Read the error log first

The log says exactly why it died. Check the service status and the log:

systemctl status mariadb
journalctl -u mariadb --no-pager | tail -40
tail -50 /var/log/mysql/error.log   # or /var/log/mariadb/

Cause 1: the disk is full

MySQL won't start if it can't write. Check space — if full, free some and try again (see no space left on device):

df -h

Cause 2: a bad config

A typo or bad value in my.cnf (e.g. an oversized buffer the box can't allocate) stops startup. The log names the bad directive — fix or revert your last config change.

Cause 3: port already in use

If 3306 is held by a stuck old instance, the new one can't bind. Find and stop it (see address already in use):

ss -tlnp | grep 3306

Cause 4: corrupted tables / crash recovery

After an unclean shutdown, InnoDB may fail recovery. The log will mention InnoDB; in serious cases an innodb_force_recovery value in my.cnf gets it up long enough to dump data. Back up first.

Back up before recovery steps

Before any forced-recovery or table-repair action, copy the data directory. Recovery options can be one-way — a backup is your safety net.

The error log names the cause: disk full, bad config, port clash or InnoDB recovery. Read it before changing anything.

Managed databases that stay up

Our managed hosting runs and monitors MySQL/MariaDB for you, so game panels and sites keep their database.

See hosting
FAQ

Frequently asked questions

Why won't MariaDB/MySQL start?

Common causes are a full disk, a bad my.cnf value, port 3306 already in use, or InnoDB crash-recovery after an unclean shutdown. The error log (in /var/log/mysql or via journalctl) names the exact reason.

Where is the MySQL error log?

Usually /var/log/mysql/error.log or /var/log/mariadb/mariadb.log, and also via journalctl -u mariadb. It records precisely why startup failed.

My database crashed and won't recover — what now?

Back up the data directory first. Then read the InnoDB messages in the log; a controlled innodb_force_recovery value can bring it up long enough to dump your data. Get a backup before attempting repairs.

Knowledge base

Related articles

Skip the troubleshooting

Managed, protected hosting in Frankfurt — we handle the Linux, the network and the DDoS so you don't have to.

Payments Secure checkout with cards, banking apps and digital wallets.

Choose the payment flow that fits your stack and region without leaving the platform.

Pay by Zen Visa Mastercard Paysafecard PaysafeCash Skrill Trustly Bancontact UnionPay iDeal WebMoney