stop/start mySQL windows service on remote machine

Posted on 2007-10-04
Last Modified: 2010-08-05
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?
Question by:Jester_48
    LVL 1

    Expert Comment

    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.
    LVL 9

    Accepted Solution

    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
    Foreword This is an old article.  Instead of using the MySQL extension that was used in the original code examples, please choose one of the currently supported database extensions instead.  More information is available here: MySQLi / PDO (http://…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now