- Welcome to Geeksww.com
How to find MySQL server uptime?
You can use mysqladmin utility to find MySQL server's uptime. Run the following command from command line.
mysqladmin -u<user> -p<password> -h<host name/IP> version
Replace <user> with MySQL username, <password> with password (you can enter invisible password later by using -p only and entering password at the password prompt). The command above not only tells you server's version but also tells you server uptime.
Here is sample output from my server
> mysqladmin -uroot -p -hlocalhost version Enter password: ******** mysqladmin Ver 8.41 Distrib 5.0.84, for Win32 on ia32 Copyright (C) 2000-2006 MySQL AB This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL license Server version 5.0.84-community-nt Protocol version 10 Connection localhost via TCP/IP TCP port 3306 Uptime: 14 hours 39 min 25 sec Threads: 9 Questions: 5109 Slow queries: 0 Opens: 47 Flush tables: 1 Open t ables: 0 Queries per second avg: 0.097
Did this tutorial help a little? How about buy me a cup of coffee?
Please feel free to use the comments form below if you have any questions or need more explanation on anything. I do not guarantee a response.
IMPORTANT: You must thoroughy test any instructions on a production-like test environment first before trying anything on production systems. And, make sure it is tested for security, privacy, and safety. See our terms here.
tags cloud
popular searches
free download for mysql database server 5.1.5, bison, gearman, source code, php, laptop, mysql, install cairo, java, linux, install mysql, mysql initialization, mysql mysql, tools, ubuntu
Similar Tutorials:
- How to rename MySQL DB by moving tables
- How to delete rows in table when PK is referenced in another table
- Install MySQL Server 5.0 and 5.1 from source code
- MySQL table_cache, information_schema, and open files limit
- MySQL query to find all views in a database
Tutorials in 'Database Management Systems > MySQL' (more):
- What should be monitored on a busy Database/MysQL server?
- How to speed up a Mysql replica?
- The server requested authentication method unknown to the client [phpmyadmin]
- How to set default values for MySQL JSON columns
- How to delete rows in table when PK is referenced in another table
Comments (write a comment):
one of the most easiest trick in the book, but is also one of the most important codes out there for webmasters. Posted by: Remote D on Dec 02, 2011
Please let us know how to get alert if mysql service stop / restart /start ? Thnx in advance. Posted by: lakshmi on Jun 18, 2014
leave a comment