Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

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:

alt text

Now use this name in batch files.

Your start.bat:

net start "mysql"

And in your stop.bat:

net stop "mysql"
share|improve this answer
    
I receive an "Error 5: Permission denied" if I try to do this. How can this be worked around? –  Matt Jan 29 '11 at 17:05
    
@Matt run the command prompt / script as administrator. –  John T Jan 29 '11 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 –  Matt Jan 30 '11 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 Apr 30 '11 at 2:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.