How to stop mysql service under linux

青灯夜游
Release: 2022-02-22 11:35:10
Original
26864 people have browsed it

How to stop the mysql service in Linux: 1. Execute the "mysqladmin -u root shutdown" command in the terminal to shut down the mysql service; 2. Execute the "service mysql stop" command in the terminal to shut down the mysql service. .

How to stop mysql service under linux

The operating environment of this tutorial: linux5.9.8 system, mysql8 version, Dell G3 computer.

Two ways to view the mysql service under Linux:

Method one:

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

Method two:

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

Two ways to close and stop the mysql service under Linux One way:

Command line mode:

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

Service mode:

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

Two ways to start the mysql service under Linux:

Command line mode:

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

Service method:

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

[Related recommendations:mysql video tutorial]

The above is the detailed content of How to stop mysql service under linux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!