#
# tidb:a Distributed SQL Database
# GITHUB:HTTPS://GITHUB.COM/PINGCAP/TIDB
# DOC:HTTPS://GITHUB.COM/PINGCAP/DOCS-CN
#
650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/95/64/wKiom1kUfJKwCOxMAABiq7wqvQs598.png "title=" 2017-05-11_225950.png "alt=" Wkiom1kufjkwcoxmaabiq7wqvqs598.png "/>
Software download
[Email protected]_2 ~]# wget http://download.pingcap.org/tidb-latest-linux-amd64.tar.gz
Single-node testing
[Email protected]_2 ~]# tar-xf tidb-latest-linux-amd64.tar.gz [[Email protected]_2 ~]# CD tidb-latest-linux-amd64/[[ email protected]_2 tidb-latest-linux-amd64]# [[Email protected]_2 tidb-latest-linux-amd64]# Mkdir/data/tidb/{data, log}-p[[email protected]_2 tidb-latest-linux-amd64]# mkdir/data/tidb/data/{pd,tikv}-p[[email protected]_2 tidb-latest-linux-amd64]#./bin/pd-server--DATA-DIR=/DATA/TIDB/DATA/PD--log-file=/data/tidb/log/pd.log &[[ Email protected]_2 tidb-latest-linux-amd64]#/bin/tikv-server--pd= "127.0.0.1:2379"--data-dir=/data/tidb/data/ TIKV--log-file=/data/tidb/log/tikv.log &[[email protected]_2 tidb-latest-linux-amd64]#./bin/tidb-server-- STORE=TIKV--path= "127.0.0.1:2379"--log-file=/data/tidb/log/tidb.log &
Parameter explanation:
Https://github.com/pingcap/docs-cn/blob/master/op-guide/configuration.md#tidb
#测试
#安装mysql客户端工具
[[email protected]_2 ~]# yum install -y mariadb[[email protected]_2 ~] # mysql -h 127.0.0.1 -p 4000 -u root -d testwelcome to The mariadb monitor. commands end with ; or \g.your mysql connection id is 1server version: 5.7.1-tidb-1.0 mysql community Server (GPL) copyright (c) 2000, 2015, oracle, mariadb corporation ab and others. type ' help; ' or ' \h ' for help. Type ' \c ' to clear the current input statement. mysql [test]> show databases;+--------------------+| database |+--------------------+| information_schema | | performance_schema | | mysql | | test |+-------- ------------+4 rows in set (0.00 sec) mysql [(none)]> select user from mysql.user;+------+| user |+------+| root |+------+1 row in set (0.00 sec) mysql [(none)]> create database wordpressdb; query ok, 0 rows affected (2.02 sec) mysql [(none)]> create user ' wordpressuser ' @ ' localhost ' identified by ' 123456 '; query ok, 1 row affected (0.01 sec) mysql [(none)]> grant all on wordpressdb.* to ' wordpressuser ' @ ' localhost ' identified by ' 123456 ';; query ok, 0 rows affected (0.02 sec) mysql [(none)]> grant all on wordpressdb.* to ' wordpressuser ' @ '% ' identified by ' 123456 ';; query ok, 1 row affected (0.02 sec) mysql [(none)]> flush privileges; query ok, 0 rows affected (0.00 sec) mysql [(none)]> exitByeMySQL [(None)]> show databases;+--------------------+| database |+--------------------+| information_schema | | performance_schema | | mysql | | test | | wordpressdb |+--------------------+5 rows in set (0.00 sec) mysql [test]> exit
#查看端口
[[email protected]_2 ~]# netstat -lntupactive internet connections (only servers) proto recv-q send-q local address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:2379 0.0.0.0:* LISTEN 13474/./bin/pd-serv tcp 0 0 127.0.0.1:2380 0.0.0.0:* listen 13474/./bin/pd-serv tcp 0 0 192.168.122.1:53 0.0.0.0:* LISTEN 2577/dnsmasq tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1324/sshd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1766/master tcp 0 0 127.0.0.1:20160 0.0.0.0:* listen 13490/./ bin/tikv-se tcp6 0 0 :: :22 :::* LISTEN 1324/sshd tcp6 0 0 ::1:25 :::* LISTEN 1766/master tcp6 0 0 :::10080 :::* LISTEN 13528/./bin/tidb-se tcp6 0 0 :::4000 :::* LISTEN 13528/./bin/tidb-se udp 0 0 0.0.0.0:28688 0.0.0.0:* 1020/dhclient udp 0 0 192.168.122.1:53 0.0.0.0:* 2577/dnsmasq udp 0 0 0.0.0.0:67 0.0.0.0:* 2577/dnsmasq udp 0 0 0.0.0.0:68 0.0.0.0:* 1020/dhclient udp 0 0 0.0.0.0:68 0.0.0.0:* 1019/dhclient udp 0 0 0.0.0.0:53726 0.0.0.0:* 1019/dhclient udp6 0 0 :::6511 :::* &nbSp; 1019/dhclient udp6 0 0 :::53726 :::* 1020/dhclient
This article is from the "Chauncey" blog, make sure to keep this source http://cqwujiang.blog.51cto.com/10808946/1925032
TIDB Distributed Database (i)