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.
davideo7Asked:
Who is Participating?
 
triceiceCommented:
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
0
 
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.
0
 
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 http://dev.mysql.com/doc/refman/5.0/en/windows-start-command-line.html
0
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.