use of the Mysql-utilities Management toolset:
For more detailed parameters, refer to the official documentation: https://dev.mysql.com/doc/mysql-utilities/
Go directly to the MySQL website to download the RPM package installation. If the installation process prompts Mysql-connector-python version is too low, then go to the MySQL website to download the latest packaging can be.
The Community edition does not have the function which uses or does not use frequently, the note here does not list.
mysqldbcopy cloning the entire library
Example: mysqldbcopy--source=root: ' 123456 ' @localhost: 3306:/tmp/mysql.sock--destination=root: ' 123456 ' @localhost: 3306:/ Tmp/mysql.sock Db:db_clone
mysqldiskusage Statistics Space, the volume occupied by various log files
Example:mysqldiskusage--server=root: ' 123456 ' @localhost: 3306:/tmp/mysql.sock--all-v
mysqlfrm Extracts a table structure (excluding foreign key constraints, self-growing sequence numbers) from the frm at fault
Example: mysqlfrm--basedir=/usr/local/mysql/data/hellodb/classes.frm--port=3310--user=root # Note This port is random.
Mysqlindexcheck Find the redundant index under a library
Example:mysqlindexcheck--server=root: ' 123456 ' @localhost: 3306:/tmp/mysql.sock grafana-f vertical-r-D--stats
mysqlprocgrep Identify user connections that meet certain criteria
Parameters:
-G,--basic-regexp,--regexp
Use the ' REGEXP ' operator to match pattern. Default is to
Use the ' like '.
-Q,--print-sql,--sql
Print the statement instead of sending it to the
Server. If a Kill option is submitted, a procedure
Would be generated containing the code for executing
The Kill.
--sql-body only print the body of the procedure.
--kill-connection kill all matching connections.
--kill-query kill query for all matching processes.
--print print all matching processes.
-F FORMAT,--format=format
Display the output in either grid (default), tab, CSV,
or vertical format
-V,--verbose control how much information is displayed. e.g.,-V =
Verbose,-VV = more verbose,-VVV = Debug
--match-id=pattern match the ' id ' column of the Processlist table.
--match-user=pattern match the ' user ' column of the Processlist table.
--match-host=pattern match the ' host ' column of the Processlist table.
--match-db=pattern match the ' DB ' column of the Processlist table.
--match-command=pattern
Match the ' COMMAND ' column of the Processlist table.
--match-info=pattern match the ' info ' column of the Processlist table.
--match-state=pattern
Match the ' State ' column of the Processlist table.
--age=age Show only processes that has been in the current
State more than a given time.
Example:# Kill a sleep state and be in a user connection with sleep for more than 90 seconds:
Mysqlprocgrep--server=root: ' 123456 ' @localhost: 3306:/tmp/mysql.sock-f vertical--match-command= ' Sleep '--age=90s-- Kill-connection
Mysqlrpladmin
For this tool, you can refer to the https://yq.aliyun.com/articles/59234# of the blue spring God.
mysqlserverinfo Lists the details of the database (-D displays each default value,--format=vertical column display)
Example:mysqlserverinfo--server=root: ' 123456 ' @localhost: 3306:/tmp/mysql.sock-d--format=vertical
mysqlbinlogpurge Cleanup of expired binlog files
Example:mysqlbinlogpurge--server=root: ' 123456 ' @localhost: 3306:/tmp/mysql.sock
Use of the Mysql-utilities management toolset