How can I use a Task to Restart mysqld-nt.exe ?

I want to create a Task which restarts my MySQL server and I'm pretty sure it's this I have to restart: mysqld-nt.exe

What would the Task look like?

I have a windows 2008 server and I use Plesk.
Who is Participating?
You could create a .bat file and point to it with Task Scheduler for example:

@echo off
taskkill /T /F /IM "mysql-nt.exe"
c:\"location of mysql-nt.exe"\mysqld-nt.exe
Sudaraka WijesingheWeb Application ProgrammerCommented:
You should also be able to do "net restart <service name>", where the <service name> most of the is MYSQL. Depending on your setup service name could be different.
theGhost_k8Database ConsultantCommented:
Task kill is surely a not suggested way.
you create a batchscript to stop and start mysql as follows::
mysqladmin -uROOT -pPASSWORD shutdown
and you may start
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.