MySQL工具1:mysqladmin
每两秒显示一下MySQL的状态,一共显示5次。
# mysqladmin -uroot -p -i 2 -c 5 status
查看MySQL的运行状态:
#mysqladmin -uroot -p ping
mysqladmin Ver 8.42 Distrib 5.1.73, for redhat-linux-gnu on x86_64
Copyright (c) 2000, 2013, 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
owners.
Administration program for the mysqld daemon.
Usage: mysqladmin [OPTIONS] command command....
-c number 自动运行次数统计,必须和 -i 一起使用
-i number 间隔多长时间重复执行
-c, --count=# Number of iterations to make. This works with -i
(--sleep) only.
--debug-check Check memory and open file usage at exit.
--debug-info Print some debug info at exit.
-f, --force Don't ask for confirmation on drop database; with
multiple commands, continue even if an error occurs.
-C, --compress Use compression in server/client protocol.
--character-sets-dir=name
Directory for character set files.
--default-character-set=name
Set the default character set.
-?, --help Display this help and exit.
-h, --host=name Connect to host.
-b, --no-beep Turn off beep on error.
-p, --password[=name]
Password to use when connecting to server. If password is
not given it's asked from the tty.
-P, --port=# Port number to use for connection or 0 for default to, in
order of preference, my.cnf, $MYSQL_TCP_PORT,
/etc/services, built-in default (3306).
--protocol=name The protocol to use for connection (tcp, socket, pipe,
memory).
-r, --relative Show difference between current and previous values when
used with -i. Currently only works with extended-status.
-O, --set-variable=name
Change the value of a variable. Please note that this
option is deprecated; you can set variables directly with
--variable-name=value.
-s, --silent Silently exit if one can't connect to server.
-S, --socket=name The socket file to use for connection.
-i, --sleep=# Execute commands repeatedly with a sleep between.
--ssl Enable SSL for connection (automatically enabled with
other flags).Disable with --skip-ssl.
--ssl-ca=name CA file in PEM format (check OpenSSL docs, implies
--ssl).
--ssl-capath=name CA directory (check OpenSSL docs, implies --ssl).
--ssl-cert=name X509 cert in PEM format (implies --ssl).
--ssl-cipher=name SSL cipher to use (implies --ssl).
--ssl-key=name X509 key in PEM format (implies --ssl).
--ssl-verify-server-cert
Verify server's "Common Name" in its cert against
hostname used when connecting. This option is disabled by
default.
-u, --user=name User for login if not current user.
-v, --verbose Write more information.
-V, --version Output version information and exit.
-E, --vertical Print output vertically. Is similar to --relative, but
prints output vertically.
-w, --wait[=#] Wait and retry if connection is down.
--connect_timeout=#
--shutdown_timeout=#
Variables (--variable-name=value)
and boolean options {FALSE|TRUE} Value (after reading options)
--------------------------------- -----------------------------
count 0
debug-check FALSE
debug-info FALSE
force FALSE
compress FALSE
character-sets-dir (No default value)
default-character-set (No default value)
host (No default value)
no-beep FALSE
port 0
relative FALSE
socket (No default value)
sleep 0
ssl FALSE
ssl-ca (No default value)
ssl-capath (No default value)
ssl-cert (No default value)
ssl-cipher (No default value)
ssl-key (No default value)
ssl-verify-server-cert FALSE
user (No default value)
verbose FALSE
vertical FALSE
connect_timeout 43200
shutdown_timeout 3600
Default options are read from the following files in the given order:
/etc/mysql/my.cnf /etc/my.cnf ~/.my.cnf
The following groups are read: mysqladmin client
The following options may be given as the first argument:
--print-defaults Print the program argument list and exit.
--no-defaults Don't read default options from any option file.
--defaults-file=# Only read default options from the given file #.
--defaults-extra-file=# Read this file after the global files are read.
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 to log
drop databasename Delete a database and all its tables
extended-status Gives an extended status message from the server
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
MySQL工具1:mysqladmin的更多相关文章
- mysql 连接出错 'mysqladmin flush-hosts'
本文章 转载于: http://blog.itechol.com/space-33-do-blog-id-5670.html 求助QQ:499628121 环境说明: 内网测试服务器19 ...
- MySQL 工具
MySQL 客户端工具: 1:mysql #mysql的功能和Oracle的sqlplus一样,它为用户提供一个命令行接口来管理Mysql服务器. 2:mysqladmin #mysqla ...
- mysql工具的使用、增删改查
mysql工具使用 目录 mysql工具使用 mysql的程序组成 mysql工具使用 服务器监听的两种socket地址 mysql数据库操作 DDL操作 数据库操作 表操作 用户操作 查看命令SHO ...
- mysql工具
MySQL工具汇总 收录了MySQL相关有用的工具.工具包含:性能测试,状态分析,SQL路由等方面 本文汇总了和MySQL运维开发相关的所有工具,并会持续更新 工具套件集 percona-toolki ...
- MySQL工具:管理员必备的10款MySQL工具
MySQL是一个复杂的的系统,需要许多工具来修复,诊断和优化它.幸运的是,对于管理员,MySQL已经吸引了很多软件开发商推出高品质的开源工具来解决MySQL的系统的复杂性,性能和稳定性,其中大部分是免 ...
- mysql工具——perror(mysql错误代码,查看错误号释义)
mysql工具——perror(mysql查看错误代码,查看错误号释义) 关键词:mysql错误代码,mysql错误号,perror
- mysql 开发进阶篇系列 32 工具篇(mysqladmin工具)
一.概述 mysqladmin是一个执行管理操作的客户端程序.用来检要服务的配置和当前的状态,创建并删除数据库等.功能与mysql客户端类似,主要区别在于它更侧重于一些管理方面的功能.1. 查找mys ...
- 主流 SQLServer 迁移到 MySQL 工具对比
首次需要数据转换是测试环节,当时为了快速验证新研发云产品性能与结果准确性(算法类),所以需大量的原始数据,最快的办法就是使用老产品的真实数据.因为在前期数据转换时主用于内部验证,并没有花很多心思去处理 ...
- 各种主流 SQLServer 迁移到 MySQL 工具对比
我之所以会写这篇对比文章,是因为公司新产品研发真实经历过这个痛苦过程(传统基于SQL Server开发的C/S产品转为MySQL云产品).首次需要数据转换是测试环节,当时为了快速验证新研发 ...
随机推荐
- Node.js学习笔记(2) - Node.js安装及入门hello world
今天来简单的记录一下Node.js的安装配置以及简单的入门 一.Node.js的安装 1.windows下的安装 windows下的安装很简单,只需要去官网http://nodejs.org中,找到w ...
- [JAVA] JAVA JDK 安装配置
JDK 安装 下载安装 下载JDK 从oracle官方网站下载并安装JDK. 下载使用文档 从oracle官方网站下载使用帮助文档. 安装库源文件 源文件位于安装目录的 /Library/Java/J ...
- IDA Supported Processors
IDA supports more than 50 families of processors. The source code of some of the processor modules i ...
- 游戏编程之Unity常用脚本类的继承关系
前言学习Unity开发引擎的初学者会接触大量的脚本类,而这些类之间的关系往往容易被忽略.本文对Unity引擎开发中的一些常用类及其关系进行了简单的归纳总结. 博文首发地址:http://tieba.b ...
- 【微信小程序】微信小程序 文本过长,自动换行的问题
小程序开发过程出现的问题: 文本过长,以致于在view中显示不全,没有自动换行的问题 解决方法: 在wxss样式文件中添加样式 .font-break { word-break:break-all; ...
- Java clone方法(下)
1.终于调用的是一个JNI方法,即java本地方法,加高速度 2.使用clone方法,分为浅复制.深复制,这里直接使用网上抄来的案例来说明吧: 说明: 1)为什么我们在派生类中覆盖Object的clo ...
- 使用addChildViewController手动控制UIViewController的切换
addChildViewController If the new child view controller is already the child of a container view con ...
- 关于 json 单引号和双引号区别--请使用双引号
双引号才是json 的标准,单引号是不规范的(虽然在js 中是行的通的)! 由于某些原因,在将js json数据传到as 中处理的时候出现了“无效的json解析输入” ,于是查找了一下js参数是否有问 ...
- linux usb信息查看与调试
lsusb cat /sys/kernel/debug/usb/devices T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 M ...
- 金蝶KIS下载地址
升级方法: 您好,建议您先升级到标准版7.5,再升级到标准版8.1,直接用7.5的软件打开金蝶2000的账套,会提示升级,再用8.1的软件打开7.5的账套,升级前,需先备份账套. 金蝶KIS标准版和业 ...