Usage of mysqladmin

Source: Internet
Author: User
Mysqladmin Mysql client management tools

Flush-hosts flush all cached hosts (max_connect_errors)
Refresh all information in host Buffer
Flush-logs flush all logs
Refresh all logs
Flush-status clear status variables
Clear status variables
Flush-tables flush all tables
Refresh all tables
Flush-threads flush the thread Cache
Refresh thread Cache
Flush-Privileges reload grant tables (same as RELOAD)
Reload the authorization table (similar to reload)
Create db_name create a new database named db_name.
Debug tell the server to write debug information to the error log.
Drop db_name Delete the database named db_name and all its tables.
Extended-Status display the server status variables and their values.
Kill ID, ID ,...
Old-Password New-Password Change Password
Password New-password set a new password

-------------------------------------------------------------------------
# mysqladmin-uroot password aixocm set a password for root
# mysqladmin-uroot-P proc stat View mySQL status value
enter password:
+ ---- + ------ + ----------- + ---- + --------- + ------ + ------- + ------------------ +
| ID | user | host | dB | command | time | state | info |
+ ---- + ------ + ----------- + ---- + --------- + ------ + ------- + ------------------ +
| 8 | root | localhost | query | 0 | show processlist |
+ ---- + ------ + ----------- + ---- + --------- + ------ + ------- + ------------------ +
uptime: 148 threads: 1 questions: 8
slow queries: 0 opens: 33 flush tables: 1
open tables: 26 queries per second AVG: 0.054
uptime --> number of seconds that MySQL server has run
threads --> active thread (customer) number of
Questions --> customer problems since the server was started (query) quantity
slow query --> Number of queries whose execution time exceeds long_query_time
opens --> Number of database tables opened on the server
flush tables --> the server has execute flush... number of refresh and reload commands
open tables --> Number of opened tables


# mysqladmin-uroot-paixocm version --> View the database version through mysqladmin
mysqladmin ver 8.42 distrib 5.1.52, for RedHat-Linux-GNU on i386
Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.
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.5.20-ndb-7.2.5
Protocol version 10
connection localhost UNIX socket
UNIX socket/var/lib/MySQL. sock
uptime: 4 min 8 sec

threads: 1 questions: 9 slow queries: 0 opens: 33 flush tables: 1 open tables: 26 queries per second AVG: 0.036

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.