Method to see how long MySQL has been running
- 2020-06-03 08:37:27
1. uptime can check the running time of the system
show global status like 'uptime';
2, use the linux command to view
There is an uptime under Linux that can see the running time of the system, but MySQL does not have this command
But you can do it with the ps command
[root@dbserver ~]# ps aux | grep mysql
root 29090 0.0 0.0 70232 1364 ? S Jun05 0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/data/mysql --pid-file=/data/mysql/dbserver.pid
As you can see, Jun05 means that the service started on June 5th. How long has it been running?
3. The following information can be seen in the status of phpmyadmin
The MySQL server has been running for 0 days, 6 hours, 30 minutes and 16 seconds and started at 08:39 on January 02, 2014.