Home  >  Article  >  Operation and Maintenance  >  How to check whether mysql is started in centos system

How to check whether mysql is started in centos system

王林
王林Original
2020-03-16 20:19:327208browse

How to check whether mysql is started in centos system

The following two methods can confirm whether mysql is starting and running:

Method 1: Query port

#netstat -tulpn

(Recommended tutorial: centos usage tutorial)

The actual usage is as shown below:

How to check whether mysql is started in centos system

MySQL monitors TCP port 3306, the last line of the command operation result in the picture That is, it means that the MySQL service is running.

Method 2: Query the process

ps -ef | grep mysqld

If there are two processes mysqld_safe and mysqld, it means that the MySQL service is currently started.

Recommended related video tutorials: linux video tutorial

The above is the detailed content of How to check whether mysql is started in centos system. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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