The MySQL server runs as a background service. Be default, it is set to start automatically when Windows starts. You can manage this service from the Windows Services applet and from the command line.

The MySQL server program is mysqld . This must first be active and running for MySQL to provide any services.

The MySQL server can be run as a service, or started manually from the command line. To start, stop or restart the MySQL server as a service, use the Windows Services app, services.msc. This can be run with Windows + r and typing services.msc into the Run dialog box.

To start MySQL from the command line, use the following:

PowerShell:

1& 'C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld'

CMD:

1"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld"

The MySQL server can be stopped with:

PowerShell:

1& 'C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqladmin' -u root -p shutdown

CMD:

1"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqladmin" -u root -p shutdown