Let us understand how MySQL server can be started and stopped on Linux and Windows −
On Linux, the start and stop can be done from the command line as shown below −
/etc/init.d/mysqld start /etc/init.d/mysqld stop
Some Linux types offer service command as well −
service mysqld start
service mysqld stop
service mysqld restart
service mysql start
service mysql stop
service mysql restart
Let us understand how it can be done on Windows −
Open ‘Run’ Window by using Win key + R
Now search for MySQL service based on the version that is installed.
Click on ‘stop’, ‘start’ or ‘restart’ the service option.
Otherwise, the user can start/stop MySQL from the command prompt. It can be done as shown below −
C:\> "C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld"
C:\> "C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqladmin" −u root shutdown