<span id="mktg5"></span>

<i id="mktg5"><meter id="mktg5"></meter></i>

        <label id="mktg5"><meter id="mktg5"></meter></label>
        最新文章專題視頻專題問答1問答10問答100問答1000問答2000關(guān)鍵字專題1關(guān)鍵字專題50關(guān)鍵字專題500關(guān)鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關(guān)鍵字專題關(guān)鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
        問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
        當(dāng)前位置: 首頁 - 科技 - 知識(shí)百科 - 正文

        MYSQL入門學(xué)習(xí)之十八:MYSQLADMIN命令參數(shù)詳解_MySQL

        來源:懂視網(wǎng) 責(zé)編:小采 時(shí)間:2020-11-09 18:28:23
        文檔

        MYSQL入門學(xué)習(xí)之十八:MYSQLADMIN命令參數(shù)詳解_MySQL

        MYSQL入門學(xué)習(xí)之十八:MYSQLADMIN命令參數(shù)詳解_MySQL:bitsCN.com MYSQL入門學(xué)習(xí)之十八:MYSQLADMIN命令參數(shù)詳解 相關(guān)鏈接:MYSQL入門學(xué)習(xí)之一:基本操作http:///database/201212/173868.htmlMYSQL入門學(xué)習(xí)之二:使用正則表達(dá)式搜索http:///database/201212/173869.htmlMYSQ
        推薦度:
        導(dǎo)讀MYSQL入門學(xué)習(xí)之十八:MYSQLADMIN命令參數(shù)詳解_MySQL:bitsCN.com MYSQL入門學(xué)習(xí)之十八:MYSQLADMIN命令參數(shù)詳解 相關(guān)鏈接:MYSQL入門學(xué)習(xí)之一:基本操作http:///database/201212/173868.htmlMYSQL入門學(xué)習(xí)之二:使用正則表達(dá)式搜索http:///database/201212/173869.htmlMYSQ

        bitsCN.com

        MYSQL入門學(xué)習(xí)之十八:MYSQLADMIN命令參數(shù)詳解

        相關(guān)鏈接:

        MYSQL入門學(xué)習(xí)之一:基本操作

        http:///database/201212/173868.html

        MYSQL入門學(xué)習(xí)之二:使用正則表達(dá)式搜索

        http:///database/201212/173869.html

        MYSQL入門學(xué)習(xí)之三:全文本搜索

        http:///database/201212/173873.html

        MYSQL入門學(xué)習(xí)之四:MYSQL的數(shù)據(jù)類型

        http:///database/201212/175536.html

        MYSQL入門學(xué)習(xí)之五:MYSQL的字符集

        http:///database/201212/175541.html

        MYSQL入門學(xué)習(xí)之六:MYSQL的運(yùn)算符

        http:///database/201212/175862.html

        MYSQL入門學(xué)習(xí)之七:MYSQL常用函數(shù)

        http:///database/201212/175864.html

        MYSQL入門學(xué)習(xí)之八:數(shù)據(jù)庫及表的基本操作

        http:///database/201212/175867.html

        MYSQL入門學(xué)習(xí)之九:索引的簡單操作

        http:///database/201212/176772.html

        MYSQL入門學(xué)習(xí)之十:視圖的基本操作

        http:///database/201212/176775.html

        MYSQL入門學(xué)習(xí)之十一:觸發(fā)器的基本操作

        http:///database/201212/176781.html

        MYSQL入門學(xué)習(xí)之十二:存儲(chǔ)過程的基本操作

        http:///database/201212/177380.html

        MYSQL入門學(xué)習(xí)之十三:自定義函數(shù)的基本操作

        http:///database/201212/177382.html

        MYSQL入門學(xué)習(xí)之十四:游標(biāo)的基本操作

        http:///database/201212/177384.html

        MYSQL入門學(xué)習(xí)之十五:事務(wù)處理的基本操作

        http:///database/201212/177385.html

        MYSQL入門學(xué)習(xí)之十六:MYSQL命令參數(shù)詳解

        http:///database/201212/178079.html

        mysqladmin工具主要用來對數(shù)據(jù)庫做一些簡單的操作,以及顯示服務(wù)器狀態(tài)等。其使用格式如下:

        mysqladmin [option] command [command option] command ......

        在命令行中輸入mysqladmin -,打印出如下幫助信息

        [sql]

        C:/Users/qxl>mysqladmin --help

        mysqladmin Ver 8.42 Distrib 5.1.28-rc, for Win32 on ia32

        Copyright (C) 2000-2006 MySQL AB

        This software comes with ABSOLUTELY NO WARRANTY. This is free software,

        and you are welcome to modify and redistribute it under the GPL license

        Administration program for the mysqld daemon.

        Usage: mysqladmin [OPTIONS] command command....

        -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 where character sets are.

        --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.

        -W, --pipe Use named pipes to connect to server.

        -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 of connection (tcp,socket,pipe,memory).

        -r, --relative Show difference between current and previous values when

        used with -i. Currently works only 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.

        --shared-memory-base-name=name

        Base name of shared memory.

        -s, --silent Silently exit if one can't connect to server.

        -S, --socket=name Socket file to use for connection.

        -i, --sleep=# Execute commands again and again 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

        shared-memory-base-name (No default value)

        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:

        C:/Windows/my.ini C:/Windows/my.cnf C:/my.ini C:/my.cnf D:/APMServ5.2.6/MySQL5.1/my.ini D:/APMServ5.2.6/MySQL5.1/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 options 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

        幫助信息主要包括三部分:

        第一部分為mysqladmin命令的相關(guān)選項(xiàng),詳細(xì)說明如下:

        -c, --count=# Number of iterations to make. This works with -i (--sleep) only. 自動(dòng)運(yùn)行次數(shù),必須和 -i 一起使用

        --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. 禁用錯(cuò)誤,drop 數(shù)據(jù)庫時(shí)不提示,執(zhí)行多條命令時(shí)出錯(cuò)繼續(xù)執(zhí)行

        -C, --compress Use compression in server/client protocol. 在服務(wù)器和客戶端之間使用壓縮

        --character-sets-dir=name Directory where character sets are. 設(shè)置字符集目錄

        --default-character-set=name Set the default character set. 設(shè)置字符集默認(rèn)目錄

        -?, --help Display this help and exit. 顯示幫助信息

        -h, --host=name Connect to host. 主機(jī)名

        -b, --no-beep Turn off beep on error. 報(bào)錯(cuò)時(shí),不響鈴(嘟的一聲)

        -p, --password[=name] Password to use when connecting to server. If password is not given it's asked from the tty. 服務(wù)器連接密碼

        -W, --pipe Use named pipes to connect to server. 使用命名管道連接服務(wù)器

        -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). 端口號(hào)

        --protocol=name The protocol of connection (tcp,socket,pipe,memory). 設(shè)置連接使用的協(xié)議

        -r, --relative Show difference between current and previous values when used with -i. Currently works only with extended-status. 顯示前后變化的值,必須結(jié)合- i

        -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. 修改變量的值,使用--variable-name=value 的方式修改變量值

        --shared-memory-base-name=name Base name of shared memory.

        -s, --silent Silently exit if one can't connect to server. 如果連接服務(wù)器失敗則退出

        -S, --socket=name Socket file to use for connection. 指定socket file

        -i, --sleep=# Execute commands again and again with a sleep between. 間隔一段時(shí)間執(zhí)行一次

        --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. 顯示MYSQLADMIN的版本

        -E, --vertical Print output vertically. Is similar to --relative, but prints output vertically. 垂直顯示輸出

        -w, --wait[=#] Wait and retry if connection is down. 如果連接斷開,則等待并重試

        --connect_timeout=# 連接超時(shí)

        --shutdown_timeout=# 超時(shí)關(guān)閉 示例:

        [sql]

        C:/Users/qxl>mysqladmin -uroot -E -i 3 -c 2 status

        Uptime: 1590 Threads: 1 Questions: 5 Slow queries: 0 Opens: 15 Flush tables: 1 Open tables: 8 Queries per second

        avg: 0.3

        Uptime: 1593 Threads: 1 Questions: 5 Slow queries: 0 Opens: 15 Flush tables: 1 Open tables: 8 Queries per second

        avg: 0.3

        C:/Users/qxl>mysqladmin -V

        mysqladmin Ver 8.42 Distrib 5.1.28-rc, for Win32 on ia32

        第二部分為mysqladmin的相關(guān)變量。

        第三部分為mysqladmin可以執(zhí)行的相關(guān)服務(wù)器命令,詳細(xì)說明如下:

        create databasename Create a new database 創(chuàng)建一個(gè)新數(shù)據(jù)庫

        debug Instruct server to write debug information to log 通知服務(wù)器將調(diào)試信息寫入日志

        drop databasename Delete a database and all its tables 刪除一個(gè)數(shù)據(jù)庫及其所有表

        extended-status Gives an extended status message from the server 給出服務(wù)器的一個(gè)擴(kuò)展?fàn)顟B(tài)消息

        flush-hosts Flush all cached hosts 清除所有緩存的主機(jī)

        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) 再次裝載授權(quán)表(同reload)

        kill id,id,... Kill mysql threads 殺死m(xù)ysql線程

        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 檢查mysqld是否在線

        processlist Show list of active threads in server 顯示服務(wù)其中活躍線程列表

        reload Reload grant tables 重載授權(quán)表

        refresh Flush all tables and close and open logfiles 洗掉所有表并關(guān)閉和打開日志文件

        shutdown Take server down 關(guān)掉服務(wù)器

        status Gives a short status message from the server 給出服務(wù)器的簡短狀態(tài)消息

        start-slave Start slave 啟動(dòng)slave

        stop-slave Stop slave 關(guān)閉slave

        variables Prints variables available 打印出可用變量

        version Get version info from server 得到服務(wù)器的版本信息

        示例:

        [sql]

        C:/Users/qxl>mysqladmin -uroot version

        mysqladmin Ver 8.42 Distrib 5.1.28-rc, for Win32 on ia32

        Copyright (C) 2000-2006 MySQL AB

        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.1.28-rc-community

        Protocol version 10

        Connection localhost via TCP/IP

        TCP port 3306

        Uptime: 31 min 3 sec

        Threads: 1 Questions: 23 Slow queries: 0 Opens: 16 Flush tables: 2 Open tables: 0 Queries per second avg: 0.12

        C:/Users/qxl>mysqladmin -u root -p create test_admin

        Enter password:

        C:/Users/qxl>mysqladmin -u root -p drop test_admin

        Enter password:

        Dropping the database is potentially a very bad thing to do.

        Any data stored in the database will be destroyed.

        Do you really want to drop the 'test_admin' database [y/N] y

        Database "test_admin" dropped

        C:/Users/qxl>mysqladmin -u root flush-status

        C:/Users/qxl>mysqladmin -u root processlist

        +----+------+----------------+----+---------+------+-------+------------------+

        | Id | User | Host | db | Command | Time | State | Info |

        +----+------+----------------+----+---------+------+-------+------------------+

        | 21 | root | localhost:8925 | | Query | 0 | | show processlist |

        +----+------+----------------+----+---------+------+-------+------------------+

        C:/Users/qxl>mysqladmin -u root status

        Uptime: 1947 Threads: 1 Questions: 32 Slow queries: 0 Opens: 18 Flush tables: 2 Open tables: 2 Queries per second

        avg: 0.16

        其中mysqladmin -u root status輸出信息中各項(xiàng)的詳細(xì)說明如下:

        Uptime:MySQL服務(wù)器已經(jīng)運(yùn)行的秒數(shù)

        Threads:活躍線程(客戶)的數(shù)量

        Questions:從mysqld啟動(dòng)起來自客戶查詢的數(shù)量

        Slow queries:已經(jīng)超過long_query_time秒的查詢數(shù)量

        Opens:mysqld已經(jīng)打開了多少表

        Flush tables:flush ..., refresh和reload命令數(shù)量

        Open tables:現(xiàn)在被打開的表數(shù)量

        Queries per second avg:查詢平均用時(shí)

        bitsCN.com

        聲明:本網(wǎng)頁內(nèi)容旨在傳播知識(shí),若有侵權(quán)等問題請及時(shí)與本網(wǎng)聯(lián)系,我們將在第一時(shí)間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

        文檔

        MYSQL入門學(xué)習(xí)之十八:MYSQLADMIN命令參數(shù)詳解_MySQL

        MYSQL入門學(xué)習(xí)之十八:MYSQLADMIN命令參數(shù)詳解_MySQL:bitsCN.com MYSQL入門學(xué)習(xí)之十八:MYSQLADMIN命令參數(shù)詳解 相關(guān)鏈接:MYSQL入門學(xué)習(xí)之一:基本操作http:///database/201212/173868.htmlMYSQL入門學(xué)習(xí)之二:使用正則表達(dá)式搜索http:///database/201212/173869.htmlMYSQ
        推薦度:
        標(biāo)簽: mysql 表達(dá)式 database
        • 熱門焦點(diǎn)

        最新推薦

        猜你喜歡

        熱門推薦

        專題
        Top
        主站蜘蛛池模板: 久久精品亚洲日本佐佐木明希| 四虎影院永久免费观看| 亚洲AV无码AV男人的天堂| 特级毛片爽www免费版| 亚洲av中文无码| 日韩大片在线永久免费观看网站| 成人永久免费高清| 理论亚洲区美一区二区三区| 免费a级毛片在线观看| 人人爽人人爽人人片av免费| 黑人大战亚洲人精品一区| 在线观看肉片AV网站免费 | 不卡精品国产_亚洲人成在线| 青娱乐在线免费观看视频| 亚洲人成无码网WWW| 国内精品久久久久影院免费| 久久亚洲美女精品国产精品| 国产a视频精品免费观看| 中文字幕亚洲码在线| 一本色道久久88综合亚洲精品高清| 免费大片av手机看片| 亚洲综合另类小说色区| 97公开免费视频| 亚洲男人的天堂网站| 亚洲伊人久久成综合人影院| 免费无码中文字幕A级毛片| 国产精品亚洲四区在线观看| 免费人妻无码不卡中文字幕18禁| 国产午夜无码片免费| 337p日本欧洲亚洲大胆精品555588| 午夜一级免费视频| 91在线免费观看| 亚洲人成影院在线高清| 亚洲国产精品激情在线观看| 亚洲午夜免费视频| 亚洲国产成人AV网站| 亚洲成a人片在线观看中文动漫| 91频在线观看免费大全| 一级做a爱过程免费视| 亚洲乱码在线视频| 久久国产亚洲精品麻豆|