Usage of mysqladmin

Source: Internet
Author: User
Mysqladmin-uroot-paixocmversion -- gt; Use mysqladmin to view the database version

Mysqladmin-uroot-paixocm version -- gt; Use mysqladmin to view the database version

Mysqladmin MySQL client management tool

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 the root user
# Mysqladmin-uroot-p proc stat view the 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 --> the number of seconds that the MySQL server has run
Threads --> Number of active Threads (customers)
Questions --> Number of customer problems (queries) since server startup
Slow Query --> Number of queries whose execution time exceeds long_query_time
Opens --> Number of database tables opened on the server
Flush tables --> Number of flush..., refresh, and reload commands executed by the server
Open tables --> Number of tables currently opened


# Mysqladmin-uroot-paixocm version --> Use mysqladmin to view the database version
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 via 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.