How to view how long MySQL has been running

Source: Internet
Author: User

1. uptime can be used to view the system running time

Show global status like 'uptime ';

2. Use linux commands to view

There is an uptime in Linux to view the running time of the system, but MySQL does not have this command.

However, the ps command can also be used.

[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 indicates that the service was started on July 22, June 5. How long has it been running?

3. You can view the following information in the phpmyadmin status:

The MySQL server has been running for 6 hours, 30 minutes and 16 seconds, and the start time is January 02, 2014.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.