mysqladmin的用法简介

php中文网
发布: 2016-06-07 17:18:21
原创
1498人浏览过

mysqladmin -uroot -paixocm version --gt; 通过mysqladmin查看数据库版本

mysqladmin  MySQL客户端管理工具

  flush-hosts           Flush all cached hosts (max_connect_errors)
                        刷新主机缓冲中的所有信息
  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)
                        重新载入授权表(类似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    修改密码
  password new-password        设置一个新密码
 
-------------------------------------------------------------------------
# mysqladmin -uroot password aixocm      给root设置一个密码
# mysqladmin -uroot -p proc stat    查看Mysql的状态值
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     --> MySQL服务器已经运行的秒数
Threads    --> 活动线程(客户)的数目
Questions    --> 服务器启动以来客户的问题(查询)数目
Slow Query    --> 执行时间超过long_query_time秒的查询的数量
Opens    --> 服务器已经打开的数据库表的数量
Flush tables    --> 服务器已经执行的flush ...、refresh和reload命令的数量
Open tables    --> 目前打开的表的数量

 
# mysqladmin -uroot -paixocm version  --> 通过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 via UNIX socket
UNIX socket        /var/lib/mysql/mysql.sock
Uptime:            4 min 8 sec

追梦flash企业网站管理模板A系列11.0
追梦flash企业网站管理模板A系列11.0

追梦A系列(11.0版本,以下11.0均简称为A)是针对企业网站定制设计的,模板采用全新AS3.0代码编辑,拥有更快的运行和加载速度,A系列模板主要针对图片展示,拥有简洁大气展示效果,并且可以自由扩展图片分类,同时还拥有三个独立页面介绍栏目,一个新闻栏目,一个服务介绍栏目,一个幻灯片展示和flv视频播放栏目。A系列模板对一些加载效果进行了修改,包括背景的拉伸模式以及标题的展示方式等都进行了调整,同

追梦flash企业网站管理模板A系列11.0 0
查看详情 追梦flash企业网站管理模板A系列11.0

Threads: 1  Questions: 9  Slow queries: 0  Opens: 33  Flush tables: 1  Open tables: 26  Queries per second avg: 0.036

linux

最佳 Windows 性能的顶级免费优化软件
最佳 Windows 性能的顶级免费优化软件

每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号