Open In App

How to Stop MySQL Server on Windows and Linux?

Last Updated : 06 Oct, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

MySQL server is an open-source relational database management system which is a major support for web based applications. Databases and related tables are the main component of many websites and applications as the data is stored and exchanged over the web. 

In this article, we will understand how to start and stop the MySQL servers on windows and Linux.

On Windows :

Starting the Server:

There are three ways, which are :

1.  With Services.msc :

  • Step 1: Open services tab.
  • Step 2: Search for MySQL service.
  • Step 3:  Click on the start or restart button to start the MySQL daemon/

2. With Command Prompt:

  • Step 1: Open command prompt
  • Step 2: Type mysqld

3. With Mysql workbench:

  • Step 1: Open MySQL workbench which comes with MySQL complete package.
  • Step 2:  Navigate to the administration’s tab.
  • Step 3: Navigate to the startup/shutdown tab.
  • Step 4: You will find an option to start the server only when the server is not on.

Stopping the Server:

1. Using Services as specified above

2. With mysqladmin :

     mysqladmin -u <username> shutdown

 3. Using MySQL workbench startup/shutdown tab.

On Linux :

Starting the Server:

1. With Command Line:

  • Step1 : Open the linux CLI and move to the directory where mysqld is stored.
  • Step 2: Type mysqld start.

mysqld start

2. Using service command( In specific Linux distribution)

     Step 1:Ttype sudo service mysqld start.

mysqld start

Stopping the Server:

1. Using the command line type mysqld stop or sudo service mysqld stop

2. With mysqladmin :

    mysqladmin -u <username> shutdown

3. Using the MySQL workbench startup/shutdown tab.


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads