Home > Database > Mysql Tutorial > body text

How to check whether mysql is started in Linux?

黄舟
Release: 2019-11-23 10:26:18
Original
30379 people have browsed it

There are many services under Linux. Today I will write about how to check whether the service is started, using mysql as an example.

1. Use the command # service mysqld status command to check the startup status of mysql as shown in the figure: mysqld is stopped, which means that the mysql service is stopped. If it is mysqld is running, then It means that the mysql service is started

How to check whether mysql is started in Linux?

How to check whether mysql is started in Linux?

##Recommended Manual:MySQL Development Manual

2. Use the command chkconfig --list command to view the startup status of mysql As shown in the figure: Find the mysqld service in the following services. If the status is off, it means that the mysql service has not been started

How to check whether mysql is started in Linux?

3. Use the command chkconfig --list mysqld command to check the startup status of mysql as shown in the figure: Find the mysqld service in the following services. If the status is off, it means that the mysql service has not started

How to check whether mysql is started in Linux?

4. Use the command chkconfig --list | grep on command to check the startup status of mysql as shown in the figure: If the mysql service has been started, then here will be There is this service

How to check whether mysql is started in Linux?

5. Use the command chkconfig --list | grep off command to check the startup status of mysql as shown in the figure Shown: If the mysql service is not started, then there will be this service

How to check whether mysql is started in Linux?

6. Use the command ps aux | grep The mysqld command is used to view the startup status of mysql as shown in the figure: The following figure compares the status of startup and non-startup

How to check whether mysql is started in Linux?

How to check whether mysql is started in Linux?

##7. Use the command pidof mysqld command to check the startup status of mysql as shown in the figure: If the PID is displayed, it means that the program has started. If the PID is not displayed, it means that the program has not started.

How to check whether mysql is started in Linux?

How to check whether mysql is started in Linux?

# Recommended related articles:
1.How to check the number of connections and connection status in MySQL
Related video recommendations:
1.MySQL Authoritative Development Guide (Tutorial)

The above is the detailed content of How to check whether mysql is started in 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
Popular Tutorials
More>
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!