

- 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 recommend thoroughy testing on a production-like test system first before moving to production.
tags cloud
popular searches
free download for mysql database server 5.1.5, bison, gearman, install cairo, php, java, install mysql, laptop, linux, mysql mysql, mysql, source code, mysql initialization, tools, ubuntu
Similar Tutorials:
- MySQL DATE_FORMAT function and ORDER BY
- Seeing indexes in a MySQL table
- How to set innodb_flush_log_at_timeout in MySQL 5.6?
- MySQL Query Cache not necessarily a bad thing
- Install MySQL Server 5.0 and 5.1 from source code
Tutorials in 'Database Management Systems > MySQL' (more):
- How to set default values for MySQL JSON columns
- How to delete rows in table when PK is referenced in another table
- Unique primary keys(PKs) for MySQL using Redis
- How to rename MySQL DB by moving tables
- How to set innodb_flush_log_at_timeout in MySQL 5.6?
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 Data Centre 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