Tuesday, September 11, 2007

How to Make Sure MySQL is Running?

To ping MySQL,
$ mysqladmin -u root ping
mysqld is alive

To check MySQL Server's version,
$ mysqladmin -u root version
mysqladmin  Ver 8.41 Distrib 5.0.77, for redhat-linux-gnu on x86_64
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.77
Protocol version        10
Connection              Localhost via UNIX socket
UNIX socket             /var/lib/mysql/mysql.sock
Uptime:                 22 min 25 sec

Threads: 1  Questions: 6  Slow queries: 0  Opens: 12  Flush tables: 1  Open tables: 6  Queries per second avg: 0.004

No comments:

Post a Comment