Skip to content

Instantly share code, notes, and snippets.

@ergin
Created July 31, 2023 09:44
Show Gist options
  • Save ergin/b90ebee3cf32161ead257edda4f0d2ff to your computer and use it in GitHub Desktop.
Save ergin/b90ebee3cf32161ead257edda4f0d2ff to your computer and use it in GitHub Desktop.

Install MySQL on Windows by scoop

Install latest version of MySQL via scoop package manager on Windows. If you want to install specific version of MySQL, just replace "mysql" with "mysql@version". For example: "mysql@8.1.0".

Install MySQL

scoop install mysql -g

Configure MySQL as a Windows Service

cd C:\ProgramData\scoop\apps\mysql\current\bin
mysqld --install MySQL --defaults-file="C:\ProgramData\scoop\apps\mysql\current\my.ini"

Start or Stop MySQL Service

net start MySQL
net stop MySQL

Note: you can use Task Manager -> Services tab -> MySQL to start/stop without commands above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment