What is the MySQL service name?

Get-Service | where{$_.name  -like "*MySQL*"}

Is that correct?


You can utilize Get-Service and the -Name property to find the exact server name. It has the same effect as doing the search with Where-Object but is less typing.

Get-Service -Name MySql

or just

Get-Service MySql

If you want to start or stop the service you can pipe that to the appropriate command

Get-Service MySql | Stop-Service
|improve this answer|||||

User the sc (Service Control) command and pipe output to find command

sc queryex type=service state=all | find /i "MySQL"

Please note that this does not require powershell

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.