Home > Operation and Maintenance > Linux Operation and Maintenance > Two ways to view, start and shut down mysql in linux

Two ways to view, start and shut down mysql in linux

藏色散人
Release: 2021-11-11 14:14:29
forward
3214 people have browsed it

The following column linux system tutorial will introduce to you how to view, start and close mysql in Linux. I hope it will be helpful to friends in need!

1. 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

2. 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 mode:

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

If the service is in the starting state , directly restart the service with the following command:

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

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

Command line method:

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

Service method:

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

Recommended learning: "linux video tutorial"

The above is the detailed content of Two ways to view, start and shut down mysql in linux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:juejin.im
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