top of page

How to Stop MySQL Server

In this article we will learn how to stop MySQL Server on Linux and Windows.


Stop MySQL Server on Linux


We can use the following command to stop MySQL Server on Linux :

/etc/init.d/mysqld stop 

Some Linux distributions provide server command:

service mysqld stop 

Or

service mysql stop 

Stop MySQL Server on Windows


We can stop MySQL Server on windows platform 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.


Follow below steps to stop MySQL :


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

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

3. 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.


That's all in this post. If you liked this blog and interested in knowing more about MySQL, Please Like, Follow, Share & Subscribe to imjhachandan.com

Comments


jc_logo.png

Hi, thanks for stopping by!

Welcome! to my “Muse & Learn” blog.

This website will help you to learn useful queries/SQL, Tips to troubleshoot problem and their remediation, perform DB related activities etc... and don't forget to muse with us :)....

It cover few useful information on below topics :

 

MySQL, SQL Server, DB2, Linux/UNIX/AIX, HTML ....

Let the posts
come to you.

Thanks for submitting!

  • Instagram
  • Facebook
  • Twitter
© 2023 By ImJhaChandan
bottom of page