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
Threads: 1 Questions: 9 Slow queries: 0 Opens: 33 Flush tables: 1 Open tables: 26 Queries per second avg: 0.036
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
Threads: 1 Questions: 9 Slow queries: 0 Opens: 33 Flush tables: 1 Open tables: 26 Queries per second avg: 0.036
相關文章
- expdp 的用法簡介
- AWK用法簡介
- javascript的this用法簡單介紹JavaScript
- display:table-cell的用法簡介
- 【python】os模組 的用法簡介Python
- xml schema 中elementFormDefault 的用法簡介XMLORM
- Hbase簡介和基本用法
- Oracle Scheduler(1)用法簡介Oracle
- start with ... connect by用法簡介
- linux命令下jq的用法簡介Linux
- angularJS的router用法簡單介紹AngularJS
- javascript的分號(;)用法簡單介紹JavaScript
- InfluxDB簡介與php用法UXPHP
- jQuery filter() 用法簡單介紹jQueryFilter
- js WebSocket用法簡單介紹JSWeb
- javascript arguments用法簡單介紹JavaScript
- onerror事件用法簡單介紹Error事件
- jquery黏貼事件用法簡介jQuery事件
- IOS中 Block簡介與用法iOSBloC
- Shell中Read用法簡介
- HP_UX Glance用法簡介UX
- js isNaN函式的用法簡單介紹JSNaN函式
- js中大括號{}的用法簡單介紹JS
- jQuery的index()函式用法簡單介紹jQueryIndex函式
- js eval()函式的用法簡單介紹JS函式
- div和span元素的用法簡單介紹
- meta標籤的viewport用法簡單介紹View
- <input type="number" >用法簡單介紹
- css 註釋用法簡單介紹CSS
- style.cssText用法簡單介紹CSS
- javascript with()語句用法簡單介紹JavaScript
- outerHTML屬性用法簡單介紹HTML
- JSON簡介以及用法彙總JSON
- IOS中 Block簡介與用法(一)iOSBloC
- 簡單介紹SQLserver中的declare變數用法SQLServer變數
- js迴圈中reduce的用法簡單介紹JS
- javascript的逗號運算子的用法簡單介紹JavaScript
- javascript中的就加號+的用法簡單介紹JavaScript