A2oz

How Do I Stop MySQL in Windows?

Published in Database Administration 2 mins read

Stopping MySQL in Windows is a straightforward process. You can achieve this using the MySQL Command Line Client or the Windows Services Manager.

Using the MySQL Command Line Client

  1. Open the Command Prompt: Press the Windows key + R, type "cmd" in the Run dialog box, and press Enter.
  2. Connect to MySQL: Type mysql -u root -p and press Enter (replace root with your MySQL username if different). You will be prompted for your password.
  3. Stop MySQL: Type shutdown and press Enter.
  4. Exit the MySQL Client: Type exit and press Enter.

Using the Windows Services Manager

  1. Open the Services Manager: Press the Windows key + R, type services.msc in the Run dialog box, and press Enter.
  2. Locate the MySQL service: Scroll down the list until you find the service named "MySQL" or similar (the name might vary depending on your MySQL installation).
  3. Stop the service: Right-click the MySQL service and select "Stop".

Additional Tips

  • Confirm the server has stopped: After using either method, you can verify that MySQL has stopped by attempting to reconnect to the server. If the connection fails, then the server has successfully stopped.
  • Restarting the server: To restart the MySQL server, follow the same steps as above, but select "Restart" instead of "Stop" in the Services Manager, or use the restart command in the MySQL client.

Related Articles