VOOZH about

URL: https://www.geeksforgeeks.org/sql/how-to-stop-mysql-server-on-windows-and-linux/

⇱ How to Start & Stop MySQL Server on Windows and Linux - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

How to Start & Stop MySQL Server on Windows and Linux

Last Updated : 14 Apr, 2026

MySQL server control is essential for managing databases in development and production environments.

  • It helps manage database services.
  • It controls server availability.
  • It supports maintenance and troubleshooting.

MySQL Server Operations on Windows

There are three ways to start MySQL on Windows: using services.msc, Command Prompt (mysqld) and MySQL Workbench.

1. With Services.msc

Step 1: Open the Services tab by typing services.msc in the Windows Run dialog.

👁 Window-services
Open the Services tab

Step 2: Search for the MySQL service in the list.

👁 search-mysql-list
Search MYSQL

Step 3: Click on the "Start" or "Restart" button to start the MySQL Server

👁 start-Mysql
Start MYSQL server
👁 Screenshot_2025-07-30_183355_optimized_100
Starting

2. Using Command Prompt:

  • Step 1: Open the Command Prompt.
  • Step 2: Type the command mysqld and hit Enter.

3. Using MySQL Workbench

Step 1: Open MySQL Workbench, which is included in the MySQL complete package. Go to the top menu bar and click on Server.

👁 Mysql-Workbench
Open MySQL Workbench

Step 2: Now Navigate to the "Startup/Shutdown" tab in the list

👁 start-and-stop-button
Navigate to the "Startup/Shutdown"

Step 4: In the window that appears, click Start Server if it's not already running.

👁 start-Mysql-server
Click on Start server

Stopping the Server

There are three ways to stop MySQL on Windows:

1. Using services.msc:

You can stop the MySQL service the same way you started it, by accessing the Services tab and clicking "Stop."

👁 Stop-mysql
Stop the server

2. Using mysqladmin:

Execute the following command in the Command Prompt:

mysqladmin -u <username> shutdown

3. Using MySQL Workbench:

Go to the "Startup/Shutdown" tab under the Administration section in MySQL Workbench and click "Stop" to shut down the server.

How to Start and Stop MySQL on Linux

MySQL server can be started using services.msc, mysqld, MySQL Workbench or sudo service mysqld start on Linux.

1. Using the Command Line:

  • Step 1: Open the Linux terminal and navigate to the directory where mysqld is located.
  • Step 2: Type the command:
mysqld start

2. Using the service command (specific Linux distributions):

  • Step 1: Run the following command to start the MySQL service:
sudo service mysqld start

Stopping the Server:

1. Using the Command Line:

To stop the MySQL server, you can use either of the following commands:

mysqld stop

or

sudo service mysqld stop

2. Using mysqladmin:

You can also stop the server by running this command:

mysqladmin -u <username> shutdown

3. Using MySQL Workbench:

Step 1: In MySQL Workbench, click the Server menu on top.

👁 mysql-workbench
Click on Server menu

Step 2: Click Startup/Shutdown from the drop-down.

👁 server-dropdown
Click Startup/Shutdown

Step 3: In the Startup/Shutdown tab, click Stop Server to stop the MySQL service

👁 Screenshot_2025-07-31_120349_optimized_100
Click Stop Server
Comment