Home >Database >Mysql Tutorial >查看 MySQL 已经运行多长时间的方法_MySQL

查看 MySQL 已经运行多长时间的方法_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-01 13:25:591041browse

bitsCN.com

一,uptime 可以查看系统的运行时间

show global status like 'uptime';

二,利用linux命令查看

Linux 下有个 uptime 可以查看系统的运行时间,可是 MySQL 可没这个命令

不过用 ps 命令也可以做到

[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

看到了吧, Jun05 就表示这个服务是在6月5日启动的,算一下运行了多久了呢?

三,利用phpmyadmin的状态中可以看如下信息

这台 MySQL 服务器已经运行了 0 天 6 小时,30 分 16 秒,启动时间为 2014 年 01 月 02 日 08:39。

bitsCN.com
Statement:
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