Install Instructions for Production Environment using:
Developer Local Install Instructions:
Download and install TiUP:
curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh
Declare the global environment variable:
Note:
After the installation, TiUP displays the absolute path of the corresponding
profile
file. You need to modify the followingsource
command according to the path.
source .bash_profile
Start the cluster in the current session:
If you want to start a TiDB cluster of the latest version with 1 TiDB instance, 1 TiKV instance, and 1 PD instance, run the following command:
tiup playground
If you want to specify the TiDB version and the number of the instances of each component, run a command like this:
tiup playground v4.0.0-rc --db 2 --pd 3 --kv 3 --monitor
The command downloads a v4.0.0-rc cluster to the local machine and starts it.
--monitor
means that the monitoring component is also deployed.
This command returns the access methods of the cluster:
CLUSTER START SUCCESSFULLY, Enjoy it ^-^
To connect TiDB: mysql --host 127.0.0.1 --port 4000 -u root
To connect TiDB: mysql --host 127.0.0.1 --port 4001 -u root
To view the dashboard: http://127.0.0.1:2379/dashboard
To view the monitor: http://127.0.0.1:9090
Start a new session to access TiDB:
mysql --host 127.0.0.1 --port 4000 -u root
Install Homebrew.
Install TiDB:
brew tap pingcap/brew
brew install tidb-server
Start TiDB:
tidb-server
If you would like to connect a MySQL client to TiDB:
brew install mysql-client
mysql -h 127.0.0.1 -P4000 -uroot
Install DBdeployer.
Install MySQL 5.7:
curl -LO https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.25-macos10.14-x86_64.tar.gz
dbdeployer unpack mysql-5.7.25-macos10.14-x86_64.tar.gz
Install TiDB:
curl -O https://download.pingcap.org/tidb-master-darwin-amd64.tar.gz
dbdeployer unpack mysql-5.7.25-macos10.14-x86_64.tar.gz
dbdeployer deploy single 3.0.0 --client-from=5.7.25
Download and install TiUP:
curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh
Declare the global environment variable:
Note:
After the installation, TiUP displays the absolute path of the corresponding
profile
file. You need to modify the followingsource
command according to the path.
source .bash_profile
Start the cluster in the current session:
If you want to start a TiDB cluster of the latest version with 1 TiDB instance, 1 TiKV instance, and 1 PD instance, run the following command:
tiup playground
If you want to specify the TiDB version and the number of the instances of each component, run a command like this:
tiup playground v4.0.0-rc --db 2 --pd 3 --kv 3 --monitor
The command downloads a v4.0.0-rc cluster to the local machine and starts it.
--monitor
means that the monitoring component is also deployed.
This command returns the access methods of the cluster:
CLUSTER START SUCCESSFULLY, Enjoy it ^-^
To connect TiDB: mysql --host 127.0.0.1 --port 4000 -u root
To connect TiDB: mysql --host 127.0.0.1 --port 4001 -u root
To view the dashboard: http://127.0.0.1:2379/dashboard
To view the monitor: http://127.0.0.1:9090
Start a new session to access TiDB:
mysql --host 127.0.0.1 --port 4000 -u root
Install Homebrew.
Install TiDB:
brew tap pingcap/brew
brew install tidb-server
Start TiDB:
tidb-server
If you would like to connect a MySQL client to TiDB:
brew install mysql-client
mysql -h 127.0.0.1 -P4000 -uroot
Install DBdeployer.
Install MySQL 5.7:
dbdeployer remote get mysql-5.7.25
dbdeployer unpack mysql-5.7.25.tar.xz
Install TiDB:
wget https://download.pingcap.org/tidb-master-linux-amd64.tar.gz
dbdeployer unpack tidb-master-linux-amd64.tar.gz --unpack-version=3.0.0
dbdeployer deploy single 3.0.0 --client-from=5.7.25
Install Homebrew.
Install TiDB:
brew tap pingcap/brew
brew install tidb-server
Start TiDB:
tidb-server
If you would like to connect a MySQL client to TiDB:
brew install mysql-client
mysql -h 127.0.0.1 -P4000 -uroot