Updated: 28 September 2026 · Applies to: MariaDB 10.5 to 11.8 and MySQL 8.0 and 8.4 on AlmaLinux and Rocky Linux 9 and 10, RHEL 9 and 10, Ubuntu 24.04 and 26.04, Debian 13
When systemctl start mariadb (or mysqld, or mysql) fails, systemd only says the job failed. The real reason is in the database's own log. This guide shows where to look and fixes the most common causes.
1. Use the right service name
- MariaDB on AlmaLinux, Rocky Linux and RHEL:
mariadb - MySQL on AlmaLinux, Rocky Linux and RHEL:
mysqld - MariaDB or MySQL on Ubuntu and Debian:
mariadbormysql
List what exists with systemctl list-unit-files | grep -Ei 'mysql|mariadb'.
2. Read the error
systemctl status mariadb journalctl -u mariadb -n 50 --no-pager
Then the database error log, which usually names the cause:
- MariaDB on AlmaLinux, Rocky Linux, RHEL:
/var/log/mariadb/mariadb.log - MySQL on AlmaLinux, Rocky Linux, RHEL:
/var/log/mysql/mysqld.log - Ubuntu and Debian:
/var/log/mysql/error.log, or the journal
3. Common causes and fixes
- Disk full: check
df -h /var/lib/mysql. Free space first; the database cannot start without room for its logs. - Port 3306 already in use ("Address already in use"): find the other process with
ss -ltnp 'sport = :3306'. Often an old instance is still running. - Wrong permissions on the data folder ("Permission denied", "Can't create/write to file"): the folder must belong to the database user:
chown -R mysql:mysql /var/lib/mysql. - SELinux after moving the data folder (AlmaLinux, Rocky Linux, RHEL): label the new location, for example
semanage fcontext -a -t mysqld_db_t "/data/mysql(/.*)?"andrestorecon -Rv /data/mysql. - A mistake in the configuration ("unknown variable" or "unknown option"): remove or fix the named setting in
/etc/my.cnf,/etc/my.cnf.d/or/etc/mysql/. Show the options the server would use withmy_print_defaults mysqld. - InnoDB crash recovery fails after a power loss or a full disk: see the log for "InnoDB" lines. Restore from backup if possible. As a last resort, add
innodb_force_recovery = 1under[mysqld]to start the server, dump the data withmysqldump, and remove the setting again. Never keep the server running with this option. - systemd times out on very large databases: recovery can take longer than the start timeout. Raise it with
systemctl edit mariadband[Service]TimeoutStartSec=900.
4. Start it again
systemctl start mariadb systemctl status mariadb
For help with a database that will not start, our engineers can step in as a paid task through Hire an Expert, from $8 per 15 minutes.
Official documentation: What to do if MariaDB does not start and Troubleshooting problems starting the MySQL server.
Ucartz services for this topic
- KVM VPS hosting: NVMe SSD and full root access, with Free Basic Managed Support.
- Unmanaged dedicated servers: full root access and free IPMI KVM, with Free Basic Managed Support.
- Linux server management: hardening, patching, monitoring and automation for Ubuntu, Debian, RHEL and AlmaLinux.
