Restart MySQL Server

Summary: in this tutorial, you will learn how to restart MySQL Server on Windows and Linux.

Restart MySQL Server on Windows

If you install MySQL as a Windows service, you can follow these steps to restart the MySQL Server.

First, press the Windows+R to open the Run dialog.

Second, type services.msc and press Enter to open the Services window.

Third, in the Services window, look for the MySQL service name, select it, and click the Restart the service button as shown in the following picture:

If you want to use commands, you can stop and start the MySQL service.

Restart MySQL Server on Linux

You use the following command to restart the MySQL Server on Linux:

First, open the Terminal program.

Second, run the following command to restart the MySQL service:

sudo systemctl restart mysql.serviceCode language: SQL (Structured Query Language) (sql)

In this command, you need to replace the mysql.serivce service name with the actual one in your server.

Third, check the status and confirm the mysql service has restarted successfully, you run the following command:

sudo systemctl status mysql.serviceCode language: CSS (css)

If the service has restarted successfully, you should see “Active: active (running)“.

Summary

  • Use the Services app to restart the MySQL Service on Windows.
  • Use the sudo systemctl restart mysql command to restart MySQL Service on Linux.
Was this tutorial helpful?