Service Management ubuntudebiancentos beginner

Restart MySQL

Restart MySQL database service

Overview

Restart MySQL database service

Commands

This will restart MySQL, active queries will be interrupted, continue?

sudo systemctl restart mysql

Use Cases

Restart is required after modifying the MySQL configuration file or when the database becomes abnormal and needs recovery.

Prerequisites

MySQL is installed.

FAQ

  • Startup failure → Run sudo tail -50 /var/log/mysql/error.log to view the error log
  • install-mysql
  • mysql-database-export