Stop MySQL Server

Created with Sketch.

Stop MySQL Server

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

Stop MySQL Server on Windows

On Windows, you can stop MySQL Server using the program mysqladmin.

The program mysqladmin locates in the folder <path_to_installation_dir>\bin, where path_to_installation_dir is the path to the installation directory e.g., C:\Program Files\MySQL\MySQL Server 8.0\

Typically, you should add the pathname of the MySQL bin directory to Windows path environment variable to access any MySQL programs in the bin directory faster.

To stop MySQL, you follow these steps:

First, launch the Command Prompt by pressing Windows+R to open the Run box and type cmd and press Enter.

Second, navigate to the bin folder of the MySQL if it is not in the Window path environment.

Third, use the following command to stop MySQL Server:

mysqladmin -u root -p shutdown
Enter password: ********

It prompts for a password of the root account. You need to enter the password and press the Enter keyboard.

The program will stop the MySQL Server.

Stop MySQL Server on Linux

To stop MySQL Server on Linux, you use the following command:

/etc/init.d/mysqld stop

Some Linux distributions provide server command:

service mysqld stop

Or

service mysql stop

In this tutorial, you have learned how to stop MySQL Server on Windows and Linux.

Leave a Reply

Your email address will not be published. Required fields are marked *