Installation on Windows
winget install -e --id Oracle.MySQL runs the MySQL Installer, which installs the server and command-line client and registers a Windows service. The interactive setup asks for a root password — write it down.
Windows service and service name
MySQL runs as a service named after the major version, typically MySQL80. The net start / net stop and sc query commands above use that name; adjust it if your version differs (check with sc query).
Adding mysql to the PATH
The executables are in C:\Program Files\MySQL\MySQL Server 8.0\bin. If mysql is not recognized, add that folder to the Path environment variable, then open a new terminal.