Docs/数据库/mysql/mysqladmin使用方法
2022-10-18 16:59:37 +08:00

29 lines
No EOL
1.3 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mysqladmin工具
mysqladmin [options] command [arg] [command[arg]] .....
command
create DB_Name 创建空数据库
-e直接返回
drop DB_Name 删除数据库
debug 打开调试日志并记录与error log中
status输出简要状态信息
-sleep # 指定显示延迟
-count # 指定批次
extended-status:输出mysq的各状态变量及数值相当于执行“mysql> show global status”
flush-hosts:清空主机相关的缓存DNS解析缓存此前因为连接错误次数过多而被拒绝访问mysqld的主机列表
flush-logs日志滚动主要是二进制日志和中继日志
refresh相当于同时使用flush-logs和flush-hosts
flush-privileges通知服务器重读授权表
reload重载授权表
flush-status重置状态变量的值
flush-tables关闭当前打开的表文件句柄
flush-threads清空线程缓存
kill杀死指定的线程可以一次杀死多个线程以逗号分隔但不能有多余空格
password修改指定用户的密码
processlist 线程列表
shutdown关闭mysqld进程
start-slave 启动从服务器进程
stop-slave 关闭从服务器进程
variables显示mysql的各服务器进程