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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.