mysqladmin - MySQL Admin Tool

This section describes how to use MySQL admin tool to check server status and other admin tasks.

If you want to know whether your MySQL server is alive, you can use the "mysqladmin" program in a command window as shown in the following tutorial:

C:\>\local\mysql\bin\mysqladmin -u root ping
mysqld is alive

The "mysqld is alive" message tells you that your MySQL server is running ok. If your MySQL server is not running, you will get a "connect ... failed" message.

You can also use "mysqladmin" program to check version number of your MySQL server in a command window as shown in the following tutorial:

C:\>\local\mysql\bin\mysqladmin -u root version
\local\mysql\bin\mysqladmin  Ver 8.42 Distrib 5.5.15, for Win32 on x86
Copyright (c) 2000, 2010, Oracle and/or its affiliates. 
All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective

Server version          5.5.15
Protocol version        10
Connection              localhost via TCP/IP
TCP port                3306
Uptime:                 8 days 15 hours 10 min 41 sec

Threads: 1  Questions: 730  Slow queries: 0  Opens: 121  
Flush tables: 1  Open tables: 0  Queries per second avg: 0.000

The output in the above example tells you that the version number is 5.5.15.

If you want to know what else you can do with "mysqladmin", you should run the "-?" option:

C:\>\local\mysql\bin>mysqladmin -?

Administration program for the mysqld daemon.
Usage: \local\mysql\bin\mysqladmin [OPTIONS] command command....
  -c, --count=#       Number of iterations to make. This works with -i
                      (--sleep) only.

Where command is a one or more of: (Commands may be shortened)
  create databasename   Create a new database
  debug                 Instruct server to write debug information
  drop databasename     Delete a database and all its tables
  extended-status       Gives an extended status message
  flush-hosts           Flush all cached hosts
  flush-logs            Flush all logs
  flush-status          Clear status variables
  flush-tables          Flush all tables
  flush-threads         Flush the thread cache
  flush-privileges      Reload grant tables (same as reload)
  kill id,id,...        Kill mysql threads
  password new-password Change old password to new-password, 
                        MySQL 4.1 hashing.
  old-password new-password 
                        Change old password to new-password 
                        in old format.
  ping                  Check if mysqld is alive
  processlist           Show list of active threads in server
  reload                Reload grant tables
  refresh               Flush all tables and close and open logfiles
  shutdown              Take server down
  status                Gives a short status message from the server
  start-slave           Start slave
  stop-slave            Stop slave
  variables             Prints variables available
  version               Get version info from server

Last update: 2015.

Table of Contents

 About This Book

 JDBC (Java Database Connectivity) Introduction

 JDK (Java SE) Installation

 Installing and Running Java DB - Derby

 Derby (Java DB) JDBC Driver

 Derby (Java DB) JDBC DataSource Objects

 Java DB (Derby) - DML Statements

 Java DB (Derby) - ResultSet Objects of Queries

 Java DB (Derby) - PreparedStatement

MySQL Installation on Windows

 MySQL 5.5 Download, Installation and Start

mysqladmin - MySQL Admin Tool

 mysql - Command Line Tool

 Creating Database and User with MySQL Monitor

 MySQL JDBC Driver (MySQL Connector/J)

 MySQL - PreparedStatement

 MySQL - Reference Implementation of JdbcRowSet

 MySQL - JBDC CallableStatement

 MySQL CLOB (Character Large Object) - TEXT

 MySQL BLOB (Binary Large Object) - BLOB

 Oracle Express Edition Installation on Windows

 Oracle JDBC Drivers

 Oracle - Reference Implementation of JdbcRowSet

 Oracle - PreparedStatement

 Oracle - JBDC CallableStatement

 Oracle CLOB (Character Large Object) - TEXT

 Oracle BLOB (Binary Large Object) - BLOB

 Microsoft SQL Server 2005 Express Edition

 Microsoft JDBC Driver for SQL Server - sqljdbc42.jar

 Microsoft JDBC Driver - Query Statements and Result Sets

 Microsoft JDBC Driver - DatabaseMetaData Object

 Microsoft JDBC Driver - DDL Statements

 Microsoft JDBC Driver - DML Statements

 SQL Server - PreparedStatement

 SQL Server CLOB (Character Large Object) - TEXT

 SQL Server BLOB (Binary Large Object) - BLOB

 JDBC-ODBC Bridge Driver - sun.jdbc.odbc.JdbcOdbcDriver

 JDBC-ODBC Bridge Driver - Flat Text Files

 JDBC-ODBC Bridge Driver - MS Access

 JDBC-ODBC Bridge Driver - MS SQL Server

 Summary of JDBC Drivers and Database Servers

 Additional Tutorial Notes to Be Added

 Outdated Tutorials


 PDF Printing Version