Home >Database >Mysql Tutorial >Starting and stopping the MySQL server

Starting and stopping the MySQL server

WBOY
WBOYforward
2023-09-04 21:01:021000browse

启动和停止 MySQL 服务器

Let us know how to start and stop MySQL server on Linux and Windows -

Linux – Starting and Stopping Server

in Linux On, starting and stopping can be done from the command line as follows -

/etc/init.d/mysqld start
/etc/init.d/mysqld stop

/etc/init.d/mysqld restart

Linux – Service Command

Some Linux types also Provide service command -

service mysqld start

##

service mysqld stop

service mysqld restart

(or)

service mysql start

##
service mysql stop

service mysql restart

Windows – Starting and Stopping Server

Let’s learn how to do this on Windows –

    Open the Run window Enter "services.msc" using Win key R
  • Now search for the MySQL service installed based on the version.
  • Click the Stop, Start or Restart service option.
  • Otherwise, users can start/stop MySQL from the command prompt. It can be done as follows -
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

The above is the detailed content of Starting and stopping the MySQL server. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete