MariaDB maxscale maxctrl维护命令
1. 列出所有的命令
[root@dragon03 etc]# maxctrl --help maxctrl Commands: maxctrl list <command> List objects maxctrl show <command> Show objects maxctrl set <command> Set object state maxctrl clear <command> Clear object state maxctrl drain <command> Drain objects maxctrl enable <command> Enable functionality maxctrl disable <command> Disable functionality maxctrl create <command> Create objects maxctrl destroy <command> Destroy objects maxctrl link <command> Link objects maxctrl unlink <command> Unlink objects maxctrl start <command> Start objects maxctrl stop <command> Stop objects maxctrl alter <command> Alter objects maxctrl rotate <command> Rotate log files maxctrl reload <command> Reload objects maxctrl call <command> Call module commands maxctrl cluster <command> Cluster objects maxctrl api <command> Raw REST API access maxctrl classify <statement> Classify statement Global Options: -u, --user Username to use [string] [default: "admin"] -p, --password Password for the user. To input the password manually, give -p as the last argument or use --password='' [string] [default: "mariadb"] -h, --hosts List of MaxScale hosts. The hosts must be in HOST:PORT format and each value must be separated by a comma. [string] [default: "localhost:8989"] -t, --timeout Request timeout in plain milliseconds, e.g '-t 1000', or as duration with suffix [h|m|s|ms], e.g. '-t 10s' [string] [default: "10000"] -q, --quiet Silence all output. Ignored while in interactive mode. [boolean] [default: false] --tsv Print tab separated output [boolean] [default: false] HTTPS/TLS Options: -s, --secure Enable HTTPS requests [boolean] [default: false] --tls-key Path to TLS private key [string] --tls-passphrase Password for the TLS private key [string] --tls-cert Path to TLS public certificate [string] --tls-ca-cert Path to TLS CA certificate [string] -n, --tls-verify-server-cert Whether to verify server TLS certificates [boolean] [default: true] Options: --version Show version number [boolean] --help Show help [boolean] If no commands are given, maxctrl is started in interactive mode. Use `exit` to exit the interactive mode.
2. list命令
[root@dragon03 etc]# maxctrl list --help Usage: list <command> Commands: maxctrl list servers List servers maxctrl list services List services maxctrl list listeners [service] List listeners maxctrl list monitors List monitors maxctrl list sessions List sessions maxctrl list filters List filters maxctrl list modules List loaded modules maxctrl list threads List threads maxctrl list users List created users maxctrl list commands List module commands Global Options: -u, --user Username to use [string] [default: "admin"] -p, --password Password for the user. To input the password manually, give -p as the last argument or use --password='' [string] [default: "mariadb"] -h, --hosts List of MaxScale hosts. The hosts must be in HOST:PORT format and each value must be separated by a comma. [string] [default: "localhost:8989"] -t, --timeout Request timeout in plain milliseconds, e.g '-t 1000', or as duration with suffix [h|m|s|ms], e.g. '-t 10s' [string] [default: "10000"] -q, --quiet Silence all output. Ignored while in interactive mode. [boolean] [default: false] --tsv Print tab separated output [boolean] [default: false] HTTPS/TLS Options: -s, --secure Enable HTTPS requests [boolean] [default: false] --tls-key Path to TLS private key [string] --tls-passphrase Password for the TLS private key [string] --tls-cert Path to TLS public certificate [string] --tls-ca-cert Path to TLS CA certificate [string] -n, --tls-verify-server-cert Whether to verify server TLS certificates [boolean] [default: true] Options: --version Show version number [boolean] --help Show help [boolean]
3. show命令
[root@dragon03 etc]# maxctrl show --help Usage: show <command> Commands: maxctrl show server <server> Show server maxctrl show servers Show all servers maxctrl show service <service> Show service maxctrl show services Show all services maxctrl show monitor <monitor> Show monitor maxctrl show monitors Show all monitors maxctrl show session <session> Show session maxctrl show sessions Show all sessions maxctrl show filter <filter> Show filter maxctrl show filters Show all filters maxctrl show listener <listener> Show listener maxctrl show listeners Show all listeners maxctrl show module <module> Show loaded module maxctrl show modules Show all loaded modules maxctrl show maxscale Show MaxScale information maxctrl show thread <thread> Show thread maxctrl show threads Show all threads maxctrl show logging Show MaxScale logging information maxctrl show commands <module> Show module commands of a module maxctrl show qc_cache Show query classifier cache maxctrl show dbusers <service> Show database users of the service Global Options: -u, --user Username to use [string] [default: "admin"] -p, --password Password for the user. To input the password manually, give -p as the last argument or use --password='' [string] [default: "mariadb"] -h, --hosts List of MaxScale hosts. The hosts must be in HOST:PORT format and each value must be separated by a comma. [string] [default: "localhost:8989"] -t, --timeout Request timeout in plain milliseconds, e.g '-t 1000', or as duration with suffix [h|m|s|ms], e.g. '-t 10s' [string] [default: "10000"] -q, --quiet Silence all output. Ignored while in interactive mode. [boolean] [default: false] --tsv Print tab separated output [boolean] [default: false] HTTPS/TLS Options: -s, --secure Enable HTTPS requests [boolean] [default: false] --tls-key Path to TLS private key [string] --tls-passphrase Password for the TLS private key [string] --tls-cert Path to TLS public certificate [string] --tls-ca-cert Path to TLS CA certificate [string] -n, --tls-verify-server-cert Whether to verify server TLS certificates [boolean] [default: true] Options: --version Show version number [boolean] --help Show help [boolean]
4. set命令
[root@dragon03 etc]# maxctrl set --help Usage: set <command> Commands: maxctrl set server <server> <state> Set server state Set options: --force Forcefully close all connections to the target server [boolean] [default: false] Global Options: -u, --user Username to use [string] [default: "admin"] -p, --password Password for the user. To input the password manually, give -p as the last argument or use --password='' [string] [default: "mariadb"] -h, --hosts List of MaxScale hosts. The hosts must be in HOST:PORT format and each value must be separated by a comma. [string] [default: "localhost:8989"] -t, --timeout Request timeout in plain milliseconds, e.g '-t 1000', or as duration with suffix [h|m|s|ms], e.g. '-t 10s' [string] [default: "10000"] -q, --quiet Silence all output. Ignored while in interactive mode. [boolean] [default: false] --tsv Print tab separated output [boolean] [default: false] HTTPS/TLS Options: -s, --secure Enable HTTPS requests [boolean] [default: false] --tls-key Path to TLS private key [string] --tls-passphrase Password for the TLS private key [string] --tls-cert Path to TLS public certificate [string] --tls-ca-cert Path to TLS CA certificate [string] -n, --tls-verify-server-cert Whether to verify server TLS certificates [boolean] [default: true] Options: --version Show version number [boolean] --help Show help [boolean]
5. clear命令
[root@dragon03 etc]# maxctrl clear --help Usage: clear <command> Commands: maxctrl clear server <server> <state> Clear server state Global Options: -u, --user Username to use [string] [default: "admin"] -p, --password Password for the user. To input the password manually, give -p as the last argument or use --password='' [string] [default: "mariadb"] -h, --hosts List of MaxScale hosts. The hosts must be in HOST:PORT format and each value must be separated by a comma. [string] [default: "localhost:8989"] -t, --timeout Request timeout in plain milliseconds, e.g '-t 1000', or as duration with suffix [h|m|s|ms], e.g. '-t 10s' [string] [default: "10000"] -q, --quiet Silence all output. Ignored while in interactive mode. [boolean] [default: false] --tsv Print tab separated output [boolean] [default: false] HTTPS/TLS Options: -s, --secure Enable HTTPS requests [boolean] [default: false] --tls-key Path to TLS private key [string] --tls-passphrase Password for the TLS private key [string] --tls-cert Path to TLS public certificate [string] --tls-ca-cert Path to TLS CA certificate [string] -n, --tls-verify-server-cert Whether to verify server TLS certificates [boolean] [default: true] Options: --version Show version number [boolean] --help Show help [boolean]
6. drain命令
[root@dragon03 etc]# maxctrl drain --help Usage: drain <command> Commands: maxctrl drain server <server> Drain a server of connections Drain options: --drain-timeout Timeout for the drain operation in seconds. If exceeded, the server is added back to all services without putting it into maintenance mode. [number] [default: 90] Global Options: -u, --user Username to use [string] [default: "admin"] -p, --password Password for the user. To input the password manually, give -p as the last argument or use --password='' [string] [default: "mariadb"] -h, --hosts List of MaxScale hosts. The hosts must be in HOST:PORT format and each value must be separated by a comma. [string] [default: "localhost:8989"] -t, --timeout Request timeout in plain milliseconds, e.g '-t 1000', or as duration with suffix [h|m|s|ms], e.g. '-t 10s' [string] [default: "10000"] -q, --quiet Silence all output. Ignored while in interactive mode. [boolean] [default: false] --tsv Print tab separated output [boolean] [default: false] HTTPS/TLS Options: -s, --secure Enable HTTPS requests [boolean] [default: false] --tls-key Path to TLS private key [string] --tls-passphrase Password for the TLS private key [string] --tls-cert Path to TLS public certificate [string] --tls-ca-cert Path to TLS CA certificate [string] -n, --tls-verify-server-cert Whether to verify server TLS certificates [boolean] [default: true] Options: --version Show version number [boolean] --help Show help [boolean]
7. enable命令
[root@dragon03 etc]# maxctrl enable --help Usage: enable <command> Commands: maxctrl enable log-priority <log> Enable log priority [warning|notice|info|debug] Global Options: -u, --user Username to use [string] [default: "admin"] -p, --password Password for the user. To input the password manually, give -p as the last argument or use --password='' [string] [default: "mariadb"] -h, --hosts List of MaxScale hosts. The hosts must be in HOST:PORT format and each value must be separated by a comma. [string] [default: "localhost:8989"] -t, --timeout Request timeout in plain milliseconds, e.g '-t 1000', or as duration with suffix [h|m|s|ms], e.g. '-t 10s' [string] [default: "10000"] -q, --quiet Silence all output. Ignored while in interactive mode. [boolean] [default: false] --tsv Print tab separated output [boolean] [default: false] HTTPS/TLS Options: -s, --secure Enable HTTPS requests [boolean] [default: false] --tls-key Path to TLS private key [string] --tls-passphrase Password for the TLS private key [string] --tls-cert Path to TLS public certificate [string] --tls-ca-cert Path to TLS CA certificate [string] -n, --tls-verify-server-cert Whether to verify server TLS certificates [boolean] [default: true] Options: --version Show version number [boolean] --help Show help [boolean]
8. disable命令
[root@dragon03 etc]# maxctrl disable --help Usage: disable <command> Commands: maxctrl disable log-priority <log> Disable log priority [warning|notice|info|debug] Global Options: -u, --user Username to use [string] [default: "admin"] -p, --password Password for the user. To input the password manually, give -p as the last argument or use --password='' [string] [default: "mariadb"] -h, --hosts List of MaxScale hosts. The hosts must be in HOST:PORT format and each value must be separated by a comma. [string] [default: "localhost:8989"] -t, --timeout Request timeout in plain milliseconds, e.g '-t 1000', or as duration with suffix [h|m|s|ms], e.g. '-t 10s' [string] [default: "10000"] -q, --quiet Silence all output. Ignored while in interactive mode. [boolean] [default: false] --tsv Print tab separated output [boolean] [default: false] HTTPS/TLS Options: -s, --secure Enable HTTPS requests [boolean] [default: false] --tls-key Path to TLS private key [string] --tls-passphrase Password for the TLS private key [string] --tls-cert Path to TLS public certificate [string] --tls-ca-cert Path to TLS CA certificate [string] -n, --tls-verify-server-cert Whether to verify server TLS certificates [boolean] [default: true] Options: --version Show version number [boolean] --help Show help [boolean]
9. create命令
[root@dragon03 etc]# maxctrl create --help Usage: create <command> Commands: maxctrl create server <name> <host|socket> [port] Create a new server maxctrl create monitor <name> <module> [params...] Create a new monitor maxctrl create service <name> <router> <params...> Create a new service maxctrl create filter <name> <module> [params...] Create a new filter maxctrl create listener <service> <name> <port> Create a new listener maxctrl create user <name> <passwd> Create a new network user Global Options: -u, --user Username to use [string] [default: "admin"] -p, --password Password for the user. To input the password manually, give -p as the last argument or use --password='' [string] [default: "mariadb"] -h, --hosts List of MaxScale hosts. The hosts must be in HOST:PORT format and each value must be separated by a comma. [string] [default: "localhost:8989"] -t, --timeout Request timeout in plain milliseconds, e.g '-t 1000', or as duration with suffix [h|m|s|ms], e.g. '-t 10s' [string] [default: "10000"] -q, --quiet Silence all output. Ignored while in interactive mode. [boolean] [default: false] --tsv Print tab separated output [boolean] [default: false] HTTPS/TLS Options: -s, --secure Enable HTTPS requests [boolean] [default: false] --tls-key Path to TLS private key [string] --tls-passphrase Password for the TLS private key [string] --tls-cert Path to TLS public certificate [string] --tls-ca-cert Path to TLS CA certificate [string] -n, --tls-verify-server-cert Whether to verify server TLS certificates [boolean] [default: true] Options: --version Show version number [boolean] --help Show help [boolean]
10. destory命令
[root@dragon03 etc]# maxctrl destroy --hel Not enough non-option arguments: got 0, need at least 1 [root@dragon03 etc]# maxctrl destroy --help Usage: destroy <command> Commands: maxctrl destroy server <name> Destroy an unused server maxctrl destroy monitor <name> Destroy an unused monitor maxctrl destroy listener <service> <name> Destroy an unused listener maxctrl destroy service <name> Destroy an unused service maxctrl destroy filter <name> Destroy an unused filter maxctrl destroy user <name> Remove a network user Global Options: -u, --user Username to use [string] [default: "admin"] -p, --password Password for the user. To input the password manually, give -p as the last argument or use --password='' [string] [default: "mariadb"] -h, --hosts List of MaxScale hosts. The hosts must be in HOST:PORT format and each value must be separated by a comma. [string] [default: "localhost:8989"] -t, --timeout Request timeout in plain milliseconds, e.g '-t 1000', or as duration with suffix [h|m|s|ms], e.g. '-t 10s' [string] [default: "10000"] -q, --quiet Silence all output. Ignored while in interactive mode. [boolean] [default: false] --tsv Print tab separated output [boolean] [default: false] HTTPS/TLS Options: -s, --secure Enable HTTPS requests [boolean] [default: false] --tls-key Path to TLS private key [string] --tls-passphrase Password for the TLS private key [string] --tls-cert Path to TLS public certificate [string] --tls-ca-cert Path to TLS CA certificate [string] -n, --tls-verify-server-cert Whether to verify server TLS certificates [boolean] [default: true] Options: --version Show version number [boolean] --help Show help [boolean]
11. link命令
[root@dragon03 etc]# maxctrl link --help Usage: link <command> Commands: maxctrl link service <name> <target...> Link targets to a service maxctrl link monitor <name> <server...> Link servers to a monitor Global Options: -u, --user Username to use [string] [default: "admin"] -p, --password Password for the user. To input the password manually, give -p as the last argument or use --password='' [string] [default: "mariadb"] -h, --hosts List of MaxScale hosts. The hosts must be in HOST:PORT format and each value must be separated by a comma. [string] [default: "localhost:8989"] -t, --timeout Request timeout in plain milliseconds, e.g '-t 1000', or as duration with suffix [h|m|s|ms], e.g. '-t 10s' [string] [default: "10000"] -q, --quiet Silence all output. Ignored while in interactive mode. [boolean] [default: false] --tsv Print tab separated output [boolean] [default: false] HTTPS/TLS Options: -s, --secure Enable HTTPS requests [boolean] [default: false] --tls-key Path to TLS private key [string] --tls-passphrase Password for the TLS private key [string] --tls-cert Path to TLS public certificate [string] --tls-ca-cert Path to TLS CA certificate [string] -n, --tls-verify-server-cert Whether to verify server TLS certificates [boolean] [default: true] Options: --version Show version number [boolean] --help Show help [boolean]
12. unlink命令
[root@dragon03 etc]# maxctrl unlink --help Usage: unlink <command> Commands: maxctrl unlink service <name> <target...> Unlink targets from a service maxctrl unlink monitor <name> <server...> Unlink servers from a monitor Global Options: -u, --user Username to use [string] [default: "admin"] -p, --password Password for the user. To input the password manually, give -p as the last argument or use --password='' [string] [default: "mariadb"] -h, --hosts List of MaxScale hosts. The hosts must be in HOST:PORT format and each value must be separated by a comma. [string] [default: "localhost:8989"] -t, --timeout Request timeout in plain milliseconds, e.g '-t 1000', or as duration with suffix [h|m|s|ms], e.g. '-t 10s' [string] [default: "10000"] -q, --quiet Silence all output. Ignored while in interactive mode. [boolean] [default: false] --tsv Print tab separated output [boolean] [default: false] HTTPS/TLS Options: -s, --secure Enable HTTPS requests [boolean] [default: false] --tls-key Path to TLS private key [string] --tls-passphrase Password for the TLS private key [string] --tls-cert Path to TLS public certificate [string] --tls-ca-cert Path to TLS CA certificate [string] -n, --tls-verify-server-cert Whether to verify server TLS certificates [boolean] [default: true] Options: --version Show version number [boolean] --help Show help [boolean]
13. start命令
[root@dragon03 etc]# maxctrl start --help Usage: start <command> Commands: maxctrl start service <name> Start a service maxctrl start monitor <name> Start a monitor maxctrl start services Start all services [aliases: maxscale] Global Options: -u, --user Username to use [string] [default: "admin"] -p, --password Password for the user. To input the password manually, give -p as the last argument or use --password='' [string] [default: "mariadb"] -h, --hosts List of MaxScale hosts. The hosts must be in HOST:PORT format and each value must be separated by a comma. [string] [default: "localhost:8989"] -t, --timeout Request timeout in plain milliseconds, e.g '-t 1000', or as duration with suffix [h|m|s|ms], e.g. '-t 10s' [string] [default: "10000"] -q, --quiet Silence all output. Ignored while in interactive mode. [boolean] [default: false] --tsv Print tab separated output [boolean] [default: false] HTTPS/TLS Options: -s, --secure Enable HTTPS requests [boolean] [default: false] --tls-key Path to TLS private key [string] --tls-passphrase Password for the TLS private key [string] --tls-cert Path to TLS public certificate [string] --tls-ca-cert Path to TLS CA certificate [string] -n, --tls-verify-server-cert Whether to verify server TLS certificates [boolean] [default: true] Options: --version Show version number [boolean] --help Show help [boolean]
14. stop命令
[root@dragon03 etc]# maxctrl stop --help Usage: stop <command> Commands: maxctrl stop service <name> Stop a service maxctrl stop monitor <name> Stop a monitor maxctrl stop services Stop all services [aliases: maxscale] Global Options: -u, --user Username to use [string] [default: "admin"] -p, --password Password for the user. To input the password manually, give -p as the last argument or use --password='' [string] [default: "mariadb"] -h, --hosts List of MaxScale hosts. The hosts must be in HOST:PORT format and each value must be separated by a comma. [string] [default: "localhost:8989"] -t, --timeout Request timeout in plain milliseconds, e.g '-t 1000', or as duration with suffix [h|m|s|ms], e.g. '-t 10s' [string] [default: "10000"] -q, --quiet Silence all output. Ignored while in interactive mode. [boolean] [default: false] --tsv Print tab separated output [boolean] [default: false] HTTPS/TLS Options: -s, --secure Enable HTTPS requests [boolean] [default: false] --tls-key Path to TLS private key [string] --tls-passphrase Password for the TLS private key [string] --tls-cert Path to TLS public certificate [string] --tls-ca-cert Path to TLS CA certificate [string] -n, --tls-verify-server-cert Whether to verify server TLS certificates [boolean] [default: true] Options: --version Show version number [boolean] --help Show help [boolean]
15. alter命令
[root@dragon03 etc]# maxctrl alter --help Usage: alter <command> Commands: maxctrl alter server <server> <key> <value> [params...] Alter server parameters maxctrl alter monitor <monitor> <key> <value> [params...] Alter monitor parameters maxctrl alter service <service> <key> <value> [params...] Alter service parameters maxctrl alter service-filters <service> [filters...] Alter filters of a service maxctrl alter logging <key> <value> [params...] Alter logging parameters maxctrl alter maxscale <key> <value> [params...] Alter MaxScale parameters maxctrl alter user <name> <passwd> Alter admin user passwords Global Options: -u, --user Username to use [string] [default: "admin"] -p, --password Password for the user. To input the password manually, give -p as the last argument or use --password='' [string] [default: "mariadb"] -h, --hosts List of MaxScale hosts. The hosts must be in HOST:PORT format and each value must be separated by a comma. [string] [default: "localhost:8989"] -t, --timeout Request timeout in plain milliseconds, e.g '-t 1000', or as duration with suffix [h|m|s|ms], e.g. '-t 10s' [string] [default: "10000"] -q, --quiet Silence all output. Ignored while in interactive mode. [boolean] [default: false] --tsv Print tab separated output [boolean] [default: false] HTTPS/TLS Options: -s, --secure Enable HTTPS requests [boolean] [default: false] --tls-key Path to TLS private key [string] --tls-passphrase Password for the TLS private key [string] --tls-cert Path to TLS public certificate [string] --tls-ca-cert Path to TLS CA certificate [string] -n, --tls-verify-server-cert Whether to verify server TLS certificates [boolean] [default: true] Options: --version Show version number [boolean] --help Show help [boolean] Multiple values can be updated at a time by providing the parameter name followed by the new value. For example, the following command would change both the `address` and the `port` parameter of a server: alter server server1 address 127.0.0.1 port 3306 All alter commands except `alter user` and `alter service-filters` support multiple parameters.
16. rotate命令
[root@dragon03 etc]# maxctrl rotate --help Usage: rotate <command> Commands: maxctrl rotate logs Rotate log files by closing and reopening the files Global Options: -u, --user Username to use [string] [default: "admin"] -p, --password Password for the user. To input the password manually, give -p as the last argument or use --password='' [string] [default: "mariadb"] -h, --hosts List of MaxScale hosts. The hosts must be in HOST:PORT format and each value must be separated by a comma. [string] [default: "localhost:8989"] -t, --timeout Request timeout in plain milliseconds, e.g '-t 1000', or as duration with suffix [h|m|s|ms], e.g. '-t 10s' [string] [default: "10000"] -q, --quiet Silence all output. Ignored while in interactive mode. [boolean] [default: false] --tsv Print tab separated output [boolean] [default: false] HTTPS/TLS Options: -s, --secure Enable HTTPS requests [boolean] [default: false] --tls-key Path to TLS private key [string] --tls-passphrase Password for the TLS private key [string] --tls-cert Path to TLS public certificate [string] --tls-ca-cert Path to TLS CA certificate [string] -n, --tls-verify-server-cert Whether to verify server TLS certificates [boolean] [default: true] Options: --version Show version number [boolean] --help Show help [boolean]
17. reload命令
[root@dragon03 etc]# maxctrl reload --help Usage: reload <command> Commands: maxctrl reload service <service> Reloads the database users of this service maxctrl reload the default command [default] Global Options: -u, --user Username to use [string] [default: "admin"] -p, --password Password for the user. To input the password manually, give -p as the last argument or use --password='' [string] [default: "mariadb"] -h, --hosts List of MaxScale hosts. The hosts must be in HOST:PORT format and each value must be separated by a comma. [string] [default: "localhost:8989"] -t, --timeout Request timeout in plain milliseconds, e.g '-t 1000', or as duration with suffix [h|m|s|ms], e.g. '-t 10s' [string] [default: "10000"] -q, --quiet Silence all output. Ignored while in interactive mode. [boolean] [default: false] --tsv Print tab separated output [boolean] [default: false] HTTPS/TLS Options: -s, --secure Enable HTTPS requests [boolean] [default: false] --tls-key Path to TLS private key [string] --tls-passphrase Password for the TLS private key [string] --tls-cert Path to TLS public certificate [string] --tls-ca-cert Path to TLS CA certificate [string] -n, --tls-verify-server-cert Whether to verify server TLS certificates [boolean] [default: true] Options: --version Show version number [boolean] --help Show help [boolean]
18. call命令
[root@dragon03 etc]# maxctrl call --help Usage: call <command> Commands: maxctrl call command <module> <command> [params...] Call a module command Global Options: -u, --user Username to use [string] [default: "admin"] -p, --password Password for the user. To input the password manually, give -p as the last argument or use --password='' [string] [default: "mariadb"] -h, --hosts List of MaxScale hosts. The hosts must be in HOST:PORT format and each value must be separated by a comma. [string] [default: "localhost:8989"] -t, --timeout Request timeout in plain milliseconds, e.g '-t 1000', or as duration with suffix [h|m|s|ms], e.g. '-t 10s' [string] [default: "10000"] -q, --quiet Silence all output. Ignored while in interactive mode. [boolean] [default: false] --tsv Print tab separated output [boolean] [default: false] HTTPS/TLS Options: -s, --secure Enable HTTPS requests [boolean] [default: false] --tls-key Path to TLS private key [string] --tls-passphrase Password for the TLS private key [string] --tls-cert Path to TLS public certificate [string] --tls-ca-cert Path to TLS CA certificate [string] -n, --tls-verify-server-cert Whether to verify server TLS certificates [boolean] [default: true] Options: --version Show version number [boolean] --help Show help [boolean]
19. cluster命令
[root@dragon03 etc]# maxctrl cluster --help Usage: cluster <command> Commands: maxctrl cluster diff <target> Show difference between host servers and <target>. maxctrl cluster sync <target> Synchronize the cluster with target MaxScale server. Global Options: -u, --user Username to use [string] [default: "admin"] -p, --password Password for the user. To input the password manually, give -p as the last argument or use --password='' [string] [default: "mariadb"] -h, --hosts List of MaxScale hosts. The hosts must be in HOST:PORT format and each value must be separated by a comma. [string] [default: "localhost:8989"] -t, --timeout Request timeout in plain milliseconds, e.g '-t 1000', or as duration with suffix [h|m|s|ms], e.g. '-t 10s' [string] [default: "10000"] -q, --quiet Silence all output. Ignored while in interactive mode. [boolean] [default: false] --tsv Print tab separated output [boolean] [default: false] HTTPS/TLS Options: -s, --secure Enable HTTPS requests [boolean] [default: false] --tls-key Path to TLS private key [string] --tls-passphrase Password for the TLS private key [string] --tls-cert Path to TLS public certificate [string] --tls-ca-cert Path to TLS CA certificate [string] -n, --tls-verify-server-cert Whether to verify server TLS certificates [boolean] [default: true] Options: --version Show version number [boolean] --help Show help [boolean]
20. api命令
[root@dragon03 etc]# maxctrl api --help Usage: api <command> Commands: maxctrl api get <resource> [path] Get raw JSON API options: --sum Calculate sum of API result. Only works for arrays of numbers e.g. `api get --sum servers data[].attributes.statistics.connections`. [boolean] [default: false] --pretty Pretty-print output. [boolean] [default: false] Global Options: -u, --user Username to use [string] [default: "admin"] -p, --password Password for the user. To input the password manually, give -p as the last argument or use --password='' [string] [default: "mariadb"] -h, --hosts List of MaxScale hosts. The hosts must be in HOST:PORT format and each value must be separated by a comma. [string] [default: "localhost:8989"] -t, --timeout Request timeout in plain milliseconds, e.g '-t 1000', or as duration with suffix [h|m|s|ms], e.g. '-t 10s' [string] [default: "10000"] -q, --quiet Silence all output. Ignored while in interactive mode. [boolean] [default: false] --tsv Print tab separated output [boolean] [default: false] HTTPS/TLS Options: -s, --secure Enable HTTPS requests [boolean] [default: false] --tls-key Path to TLS private key [string] --tls-passphrase Password for the TLS private key [string] --tls-cert Path to TLS public certificate [string] --tls-ca-cert Path to TLS CA certificate [string] -n, --tls-verify-server-cert Whether to verify server TLS certificates [boolean] [default: true] Options: --version Show version number [boolean] --help Show help [boolean]
21. classify命令
[root@dragon03 etc]# maxctrl classify --help Usage: classify <statement> Global Options: -u, --user Username to use [string] [default: "admin"] -p, --password Password for the user. To input the password manually, give -p as the last argument or use --password='' [string] [default: "mariadb"] -h, --hosts List of MaxScale hosts. The hosts must be in HOST:PORT format and each value must be separated by a comma. [string] [default: "localhost:8989"] -t, --timeout Request timeout in plain milliseconds, e.g '-t 1000', or as duration with suffix [h|m|s|ms], e.g. '-t 10s' [string] [default: "10000"] -q, --quiet Silence all output. Ignored while in interactive mode. [boolean] [default: false] --tsv Print tab separated output [boolean] [default: false] HTTPS/TLS Options: -s, --secure Enable HTTPS requests [boolean] [default: false] --tls-key Path to TLS private key [string] --tls-passphrase Password for the TLS private key [string] --tls-cert Path to TLS public certificate [string] --tls-ca-cert Path to TLS CA certificate [string] -n, --tls-verify-server-cert Whether to verify server TLS certificates [boolean] [default: true] Options: --version Show version number [boolean] --help Show help [boolean] Classify the statement using MaxScale and display the result. The possible values for "Parse result", "Type mask" and "Operation" can be looked up in https://github.com/mariadb-corporation/MaxScale/blob/2.3/include/maxscale/query_classifier.h