restart mysql server on windows 7

Solution 1:

Open the command prompt and enter the following commands:

net stop MySQL   
net start MySQL

the MySQL service name maybe changes based on the version you installed. In my situation, MySQL version is MySQL Server 5.7. So I use the following command

net stop MySQL57   
net start MySQL57

Solution 2:

You can restart the service through the UI by following these steps:

  1. Open task manager (may need to run as administrator)

  2. Click on the "Service" button and find the "MySql" service

    NOTE: In some cases, the "MySql" service will be named whatever you named the initial database when you created the server. For example, if you called the initial database "myfirstdb", then the service would be called "myfirstdb". You should be able to find the service by sorting by the "Description" column as the description will be blank.

  3. Right-click on the "MySql" service and choose the "Restart" option

Thanks to @Doug_Ivison and @Lucky for the service name notes and "run as administrator" clarification in the comments.

enter image description here

enter image description here