1 什么是 mysqladmin
mysqladmin
是一個客戶端工具用來執(zhí)行管理操作。你可以用它來檢查服務器的配置、當前狀態(tài)、創(chuàng)建或刪除數據庫等等
語法如下:
mysqladmin [options] command [command-arg] [command [command-arg]]
2 如何使用 mysqladmin
2.1 支持如下的命令
有很多的命令,只列舉一些常見的命令,如下:
-
create *
db_name
*Create a new database named *
db_name
* -
drop *
db_name
*Delete the database named *
db_name
* and all its tables -
status
Display a short server status message
-
extended-status
Display the server status variables and their values
服務器狀態(tài)變量,這么多類型變量,搞暈了?【該類型變量一般不可修改,反映服務器運行狀態(tài)】
-
variables
Display the server system variables and their values
服務器系統(tǒng)變量,這么多類型變量,搞暈了?【該類型變量一般可修改,用戶自行配置】
-
shutdown
Stop the server
-
processlist
Show a list of active server threads
2.2 支持如下選項
有很多的選項,只列舉一些常見的選項,如下:
Option Name | Description | Introduced | Deprecated |
---|---|---|---|
–host | Host on which MySQL server is located | ||
–port | TCP/IP port number for connection | ||
–user | MySQL user name to use when connecting to server | ||
–password | Password to use when connecting to server |
3 參考資料
官網 mysqladmin 命令: https://dev.mysql.com/doc/refman/8.0/en/mysqladmin.html
系統(tǒng)變量和狀態(tài)變量的區(qū)別: https://gitee.com/firefish985/article-list/blob/master/%E6%95%B0%E6%8D%AE%E5%BA%93/MySQL/MySQL%20Server%20Administration/The%20MySQL%20Server/Server%20Option,%20System%20Variable,%20and%20Status%20Variable%20Reference.md
傳送門: 保姆式Spring5源碼解析
歡迎與作者一起交流技術和工作生活文章來源:http://www.zghlxwxcb.cn/news/detail-514630.html
聯系作者文章來源地址http://www.zghlxwxcb.cn/news/detail-514630.html
到了這里,關于mysqladmin 管理 MySQL 服務器的系統(tǒng)自帶的客戶端工具的文章就介紹完了。如果您還想了解更多內容,請在右上角搜索TOY模板網以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網!