TIDB parameter explanation

Source: Internet
Author: User
Tags mysql client time interval

Address: Https://github.com/pingcap/docs-cn/blob/master/op-guide/configuration.md#tidb

Tidb--store
    • Used to specify the storage engine used by the tidb underlying
    • Default: "Goleveldb"
    • You can choose "Memory", "Goleveldb", "Boltdb" or "tikv". (the first three are local storage engines, and TIKV is a distributed storage engine)
    • For example, if we can tidb-server --store=memory start a pure memory engine by TIDB
--path
    • For the local storage Engine "Goleveldb", "Boltdb", path specifies the actual data storage path
    • For the memory storage engine, path does not have to be set
    • For the "TIKV" Storage Engine, path specifies the actual PD address. Assuming we have PD on 192.168.100.113:2379, 192.168.100.114:2379 and 192.168.100.115:2379, then path is "192.168.100.113:2379, 192.168.100.114:2379, 192.168.100.115:2379 "
    • Default: "/tmp/tidb"
-L
    • Log level
    • Default: "Info"
    • We can choose Debug, info, warn, error or fatal
--log-file
    • Log file
    • Default: ""
    • If this parameter is not set, log will be output to "stderr", if set, log will be output to the corresponding file, in the early morning, log will automatically rotate the use of a new file, and the previous file renamed back
--host
    • TIDB Service Listener Host
    • Default: "0.0.0.0"
    • The TIDB service will listen to this host
    • 0.0.0.0 will listen to all network card address by default. If you have more than one network card, you can specify a network card for external service, such as 192.168.100.113
-P
    • TIDB Service Listening Port
    • Default: "4000"
    • The TIDB service will use this port to accept requests from the MySQL client.
--status
    • TIDB Service Status Monitoring port
    • Default: "10080"
    • This port is used to display TIDB internal data. Including Prometheus Statistics and PPROF
    • Prometheus statistics can be accessed via "Http://host:status_port/metrics"
    • Pprof data can be accessed via "Http://host:status_port/debug/pprof"
--lease
    • Schema Lease time, units: seconds
    • Default: "1"
    • The lease of the schema is mainly used on the online schema changes. This value affects the execution time of the actual DDL statement. Do not change this value casually unless you know the relevant internal mechanism
--socket
    • TIDB Service accepts external connections using UNIX socket file mode
    • Default: ""
    • For example, we can use "/tmp/tidb.sock" to open the UNIX socket file
--perfschema
    • Use True/false to turn performance schemas on or off
    • Default: False
    • The value can be (true) or (false). The performance Schema can help us detect internal execution at runtime. More information can be obtained through the performance schema. However, it is important to note that opening a performance Schema can affect the performance of TIDB
--privilege
    • Use True/false to turn permissions on or off (for development debugging)
    • Default: True
    • The value can be (true) or (false). The current version of permission control is still being perfected and will be removed from this option in the future
--skip-grant-table
    • Allow anyone to connect without a password, and all actions do not check permissions
    • Default: False
    • The value can be (true) or (false). Enabling this option requires root privileges for this machine, which is typically used to reset when a password is forgotten
--report-status
    • Turn on (true) or turn off (false) the service status listening port
    • Default: True
    • The value can be (true) or (false). (true) indicates that we turn on the status listener port. (false) indicates that the shutdown
--metrics-addr
    • Prometheus Push Gateway Address
    • Default: ""
    • If blank, TIDB does not push statistics to the push Gateway
--metrics-intervel
    • Time interval for push statistics to Prometheus push Gateway
    • Default: 15s
    • Set to 0 to indicate that no push statistics are sent to the push Gateway
Placement Driver (PD)-L
    • Log level
    • Default: "Info"
    • We can choose Debug, info, warn, error or fatal
--log-file
    • Log file
    • Default: ""
    • If this parameter is not set, log will be output to "stderr", if set, log will be output to the corresponding file, in the early morning, log will automatically rotate the use of a new file, and the previous file renamed back
--config
    • Configuration file
    • Default: ""
    • If you specify a configuration file, PD reads the configuration file first. Then, if the corresponding configuration exists in the command-line arguments, PD uses the command-line parameter configuration to overwrite the configuration file.
--name
    • The name of the current PD
    • Default: "PD"
    • If you need to start multiple PD, be sure to use a different name for PD
--data-dir
    • PD Store Data path
    • Default: "Default.${name}"
--client-urls
    • Processing client request Listener URL list
    • Default: "http://127.0.0.1:2379"
    • If you deploy a cluster,--client-urls must specify the IP address of the current host, such as "http://192.168.100.113:2379", if it is running on Docker, it needs to be specified as "http://0.0.0.0:2379"
--advertise-client-urls
    • External Client Access URL list
    • Default: ${client-urls}
    • In some cases, such as Docker, or a NAT network environment, the client does not have access to PD through its own client URLs that the PD listens to, and you can set advertise URLs for the client to visit
    • For example, the Docker internal IP address is 172.17.0.1, and the host's IP address is 192.168.100.113 and the port mapping is set to-P 2,379:2,379, then it can be set to--advertise-client-urls= "http: 192.168.100.113:2379 ", the client can find this service through http://192.168.100.113:2379
--peer-urls
    • Handles other PD node requests to listen for a list of URLs.
    • Default: "http://127.0.0.1:2380"
    • If you deploy a cluster,--peer-urls must specify the IP address of the current host, such as "http://192.168.100.113:2380", if it is running on Docker, it needs to be specified as "http://0.0.0.0:2380"
--advertise-peer-urls
    • External other PD nodes access the list of URLs.
    • Default: ${peer-urls}
    • In some cases, such as Docker, or a NAT network environment, other nodes do not have access to PD through the peer URLs that PD listens to, so you can set advertise URLs for other nodes to visit
    • For example, the Docker internal IP address is 172.17.0.1, and the host's IP address is 192.168.100.113 and the port mapping is set to-P 2,380:2,380, then it can be set to--advertise-peer-urls= "http:// 192.168.100.113:2380 ", other PD nodes can find this service through http://192.168.100.113:2380
--initial-cluster
    • Initialize the PD cluster configuration.
    • Default: "{Name}=http://{advertise-peer-url}"
    • For example, if name is "PD" and advertise-peer-urls is "http://192.168.100.113:2380", then it is initial-cluster pd=http://192.168.100.113:2380
    • If you need to start three PD, it initial-cluster 's probablypd1=http://192.168.100.113:2380, pd2=http://192.168.100.114:2380, pd3=192.168.100.115:2380
--join
    • Dynamically joining PD clusters
    • Default: ""
    • If you want to dynamically add a PD to the cluster, you can use it as --join="${advertise-client-urls}" advertise-client-url any PD in the current cluster advertise-client-url , and you can use multiple PD, separated by commas.
Tikv

TIKV supports some readable unit conversions above the command line arguments.

    • File size (in bytes): KB, MB, GB, TB, PB (can also be all lowercase)
    • Time (in milliseconds): MS, S, M, h
-A,--addr
    • TIKV Listening Address
    • Default: "127.0.0.1:20160"
    • If you deploy a cluster,--addr must specify the IP address of the current host, such as "http://192.168.100.113:20160", if it is running on Docker, it needs to be specified as "http://0.0.0.0:20160"
--advertise-addr
    • TIKV external access address.
    • Default: ${addr}
    • In some cases, such as Docker, or a NAT network environment, the client does not have access to TIKV by tikv its own listening address, and you can set advertise addr to have the client
    • For example, the Docker internal IP address is 172.17.0.1, and the host's IP address is 192.168.100.113 and the port mapping is set to-P 20,160:20,160, then it can be set to--advertise-addr= "192.168.10 0.113:20,160 ", the client can find this service through 192.168.100.113:20160.
-L,--log
    • Log level
    • Default: "Info"
    • We can choose Trace, debug, info, warn, error, or off
--log-file
    • Log file
    • Default: ""
    • If this parameter is not set, log will be output to "stderr", if set, log will be output to the corresponding file, in the early morning, log will automatically rotate the use of a new file, and the previous file renamed back
-C,--config
    • Configuration file
    • Default: ""
    • If you specify a configuration file, TIKV will first read the configuration file. Then if the corresponding configuration is also present in the command-line arguments, TIKV will use the configuration of the command line parameters to override the configuration file.
--data-dir
    • TIKV Data Store Path
    • Default: "/tmp/tikv/store"
--capacity
    • TIKV capacity to store data
    • Default: 0 (unlimited)
    • PD needs to use this value to perform balance operations on the entire cluster. (Hint: You can use 10GB to replace 10737418240, thus simplifying the transfer of parameters)
--pd
    • A list of PD addresses.
    • Default: ""
    • TIKV must use this value to connect to PD to work properly. Use commas to separate multiple PD addresses, for example: 192.168.100.113:2379, 192.168.100.114:2379, 192.168.100.115:2379

TIDB parameter explanation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.