Home  >  Article  >  Database  >  How to check whether mysql is started in linux

How to check whether mysql is started in linux

WBOY
WBOYforward
2023-05-26 19:06:4012998browse

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 the mysql service is stopped. If mysqld is running, it means the mysql service is started.

How to check whether mysql is started in linux

How to check whether mysql is started in linux

2. Use the command chkconfig –list 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 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: Under the service The mysqld service is not found. If the status is off, it means that the mysql service has not been started.

How to check whether mysql is started in linux

4. Use the command chkconfig –list | grep on to check the startup status of mysql, such as As shown in the picture: If the mysql service has been started, then there will be this service here

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 follows As shown in the picture: If the mysql service is not started, then there will be this service here

How to check whether mysql is started in linux

6. Use the command ps aux | grep mysqld command to check the startup status of mysql as shown in the picture Display: 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 view the startup status of mysql as follows: 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

What is Linux system

Linux is a UNIX-like operating system that is free to use and spread freely. A POSIX-based multi-user, multi-tasking operating system that supports multi-threading and multi-CPU, Linux can run major Unix tool software, applications and network protocols.

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!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete