≡ Menu

Start / Stop / Enable / Disable mysql service

We can start MySQL service from windows command line using the below command.

net start mysql

Command to stop MySql service:

net stop mysql

Disable MySql service:

sc config mysql start= disabled

Command to enable MySql service(to automatically start MySQL service when the system starts up):

sc config mysql start= auto

Command to set the startup type to manual:

sc config mysql start= manual

How to restart MySql service?
There is no direct command to restart a service. You can combine stop and start commands like below.

net stop mysql & net start mysql

Related Posts:

How to connect to MySQL server from windows command line
How to install Mysql in Windows 7

3 comments… add one
  • vijay bhatt

    first open your command propmt and then goto MySql’s bin . Then type mysqld and press enter . You server will be started.

  • tejaswini Palekar

    Sir mySQl Services are stopped automatically. Due to this website is going down? How to fix this?

    • Srini

      If your host is Windows, you can run the below command to keep it running all the time.

      sc config mysql start= auto

      If it goes down even with this configuration, then I guess the sql service is crashing for some reason. Check if you have latest version of mysql.

Leave a Comment