Home > Database > Mysql Tutorial > What are the commands to start and shut down the mysql service in Linux?

What are the commands to start and shut down the mysql service in Linux?

WBOY
Release: 2023-05-31 12:12:02
forward
2603 people have browsed it

What are the commands to start and shut down the mysql service in Linux?

1. Two ways to view the mysql service under Linux:

Method one:

 [root@localhost bin]ps -ef|grep mysql1
Copy after login

Method two:

 [root@localhost bin]netstat -nlp1
Copy after login

2. Two ways to start the mysql service under Linux:

Command line mode:

 [root@localhost bin]cd /usr/bin
 [root@localhost bin]./mysqld_safe &12
Copy after login

Service mode:

 [root@localhost ~]service mysql start
 如果服务在启动状态,直接重启服务用以下命令:
 [root@localhost ~]service mysql restart123
Copy after login

3. Two ways to close the mysql service under Linux :

Command line mode:

 [root@localhost ~]mysqladmin -u root shutdown1
Copy after login

Service mode:

 [root@localhost ~]service mysql stop
Copy after login

The above is the detailed content of What are the commands to start and shut down the mysql service in Linux?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template