Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to check if mysql is running by linux

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "linux how to check whether mysql is running", the content of the article is simple and clear, easy to learn and understand, now please follow the editor's ideas slowly in depth, together to study and learn "linux how to check whether mysql is running" bar!

View method: 1, execute the "service mysqld status" command, if the output "mysqld is running" means that the mysql is running; 2, execute the "chkconfig-- list" command, if the status of the mysqld service is off, it is not running.

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

1. Use the command service mysqld status command to view the startup status of mysql

As shown in the figure:

Mysqld is stopped means that the mysql service is stopped. If it is mysqld is running, it means that the mysql service is started.

2. Use the command chkconfig-- list command to view the startup status of mysql

As shown in the figure: the mysqld service is found in the following services. If the status is off, the mysql service is not started.

3. Use the command chkconfig-- list mysqld command to view the startup status of mysql

As shown in the figure: find the mysqld service in the following service. If the status is off, the mysql service is not started.

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 is already started, there will be this service here.

5. Use the command ps aux | grep mysqld command to check the startup status of mysql

As shown in the figure: the comparison of the following figure shows the status of starting and not starting

6. Use the command pidof mysqld command to view the startup status of mysql

As shown in the figure: if the PID is displayed, the program is started, and if the PID is not displayed, the program is not started.

Thank you for your reading, the above is the content of "linux how to check whether mysql is running". After the study of this article, I believe you have a deeper understanding of how to check whether mysql is running in linux, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report