top of page

How to Stop MySQL Server

  • Writer: Jha Chandan
    Jha Chandan
  • Mar 21, 2021
  • 1 min read

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 
ree

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!
Muse a little, learn a lot.✌️

 

Here you’ll find practical SQL queries, troubleshooting tips with fixes, and step-by-step guidance for common database activities. And of course, don’t forget to pause and muse with us along the way. 🙂
 

I share insights on:​​

  • Db2

  • MySQL

  • SQL Server

  • Linux/UNIX/AIX

  • HTML …and more to come!
     

Whether you’re just starting out or looking to sharpen your DBA skills, there’s something here for you.

Let the posts
come to you.

Thanks for submitting!

  • Instagram
  • Facebook
  • X
2020-2025 © TechWithJC

Subscribe to Our Newsletter

Thanks for submitting!

  • Facebook
  • Instagram
  • X

2020-2025 © TechWithJC

bottom of page