I don't want MySQL to run as a default auto start service. I want to choose when to start and stop it via a shrotcut. What is the best way to accomplish this?
2 Answers
You can set its startup type to manual in services.msc. This way it will not start automatically unless required. You can create batch files to start and stop the service fairly easily as well. Simply get the name of the service from services.msc as shown here:
Now use this name in batch files.
Your start.bat:
net start "mysql"
And in your stop.bat:
net stop "mysql"
-
I receive an "Error 5: Permission denied" if I try to do this. How can this be worked around?– MattJan 29, 2011 at 17:05
-
@Matt run the command prompt / script as administrator.– user1931Jan 29, 2011 at 23:01
-
I was hoping for a less intrusive method, one where I can still just type a command to get the job done. i.e. I don't want to have to switch to the mouse and shift+right-click cmd to open it so I can then type my command– MattJan 30, 2011 at 15:38
-
You should be able to right-click your shortcut, go to "Advanced" and set it to "Run as Administrator". Then it will do this every time. See 4.bp.blogspot.com/_Sd3kgrxXWzY/TNnEeP5b_LI/AAAAAAAAAn8/…– Simon E.Apr 30, 2011 at 2:38
Simple solution I found to this error. On every Windows machine you can type in msconfig in the run dialog box by pressing windows key + r. The two workbenches should be set as separate processes. In my case one was MySQL the other was MySQL57. I wanted to stop the MySQL and it worked.