stop/start mySQL windows service on remote machine

I have mySQL installed on a win2003 server and have it running as a windows service, how can i stop and/or start teh mySQL service from a remote machine?
LVL 25
James RodgersWeb Applications DeveloperAsked:
Who is Participating?
smidgie82Connect With a Mentor Commented:
Three possible solutions:

sc.exe, available from the Windows NT Resrouce Kit, will allow you to issue commands to manipulate services on remote boxes.
usage: sc \\exampleserver stop mysql

netsvc.exe, available from the Windows NT Resource Kit, does the same, but with a narrower scope.
usage: netsvc \\exampleserver stop mysql

Details on the usage of either are available at

Also, SysInternals utility psexec allows you to execute arbitrary commands on remote computers by accessing the $ADMIN share on those boxes.  You can use it to issue a "net stop mysql" command to the server running MySQL.
The way I always do this is open up the services control (services.msc in the run box) and then  in the left section where it says "Services (Local)" right click and choose connect to another computer and input the server name.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.