Home >Database >Mysql Tutorial >How to check whether mysql is started in linux
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.
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
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.
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
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
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
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.
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!