Restart MySQL/MariaDB service

Replace mysql with mysqld for RedHat-based platforms.

Ubuntu 16.10 and later, RedHat/CentOS 7 and later, fedora and other platform with systemd

sudo systemctl restart mysql.service

Older platforms with System V init scripts

sudo /etc/init.d/mysql restart

Platforms with service command. Normally a wrapper to System V init scripts or systemd commands.

sudo sudo service mysql restart

Sign up for The Ultimate MySQL Bootcamp: Go from SQL Beginner to Expert and many other great courses on Udemy to learn more.

The Ultimate MySQL Bootcamp: Go from SQL Beginner to Expert

Become an In-demand SQL Master by creating complex databases and building reports through real-world projects!

Written by Mohd Shakir Zakaria. Last updated on 2019-02-12