MySQL Service Startup and Recovery Checklist

halfbrain_logo512adminJune 19, 2026
4 lượt xem

MySQL Service Startup and Recovery Checklist

MySQL service failures can stop WordPress, dashboards, APIs and automation systems. A system admin must know how to inspect service state, startup errors, disk pressure, config mistakes and recovery options without damaging data.

Core principle

MySQL starts only when its config is valid, data directory is readable, disk is writable, memory is available and no critical storage corruption blocks startup.

Checklist

  1. Check MySQL service status.
  2. Read recent journal logs.
  3. Check MySQL error log.
  4. Check disk space and inode usage.
  5. Check data directory ownership.
  6. Check config syntax and recent config changes.
  7. Check whether another process uses the same port.
  8. Check memory pressure.
  9. Restart only after identifying the likely cause.
  10. Verify application connection after recovery.

Reusable lesson

This applies to WordPress database errors, failed migrations, reboot recovery, full disk incidents, MySQL upgrades and server hardening.

Checklist Type Troubleshooting
Level Intermediate
Risk Level High Risk
Estimated Time 45–90 minutes

When to Use This Checklist

Use this checklist when MySQL or MariaDB fails to start, crashes after reboot or causes website database connection errors.

Required Tools

SSH access, systemctl, journalctl, MySQL error log, df, ls, ss, application config

Before You Start

Do not delete database files manually to make MySQL start. First read logs and preserve data.

Structured Checklist Steps

  1. Check service status.
  2. Read journal logs.
  3. Read MySQL error log.
  4. Check disk.
  5. Check inodes.
  6. Check data directory ownership.
  7. Check recent config changes.
  8. Check port conflict.
  9. Restart if justified.
  10. Verify application.

Rollback Plan

If recovery actions make MySQL worse, stop changes, restore the previous config and use the latest database backup or snapshot before attempting deeper repair.

Common Mistakes

  • Restarting repeatedly without logs.
  • Deleting files from /var/lib/mysql.
  • Ignoring full disk.
  • Changing config without backup.
  • Not verifying the application after service recovery.

Related Commands

sudo systemctl status mysql
journalctl -u mysql --since "30 minutes ago"
sudo tail -n 100 /var/log/mysql/error.log
df -h
df -i
sudo ss -tulpn | grep 3306
free -h
mysqladmin -u root -p ping

Share:

Disclaimer: The guides, checklists, commands, and examples on HalfBrain.net are provided for educational and operational reference only. Server environments, hosting providers, software versions, security settings, and WordPress configurations can vary, so you should always review commands before running them on your own system. We do our best to keep the content accurate and useful, but we cannot guarantee that every command, configuration, or recommendation will fit every environment. Always back up your website, database, and server configuration before making changes. HalfBrain.net is not responsible for data loss, downtime, security incidents, misconfiguration, or other issues that may result from applying the information on this website. Use the material at your own discretion.

Leave a Reply

Your email address will not be published. Required fields are marked *