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.logto view the error log
Related Commands
- install-mysql
- mysql-database-export