1 Star 0 Fork 0

Artlongs / tidb

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
QUICKSTART.md 1.54 KB
一键复制 编辑 原始数据 按行查看 历史
goroutine 提交于 2016-12-12 16:38 . Add prompt text (#2227)

Quick Start

Run TiDB with Docker (Standalone mode)

You can quickly test TiDB with Docker, the source repository contains the Dockerfile which contains local tidb-server.

To install Docker on your system, you can read the document on https://docs.docker.com/

docker pull pingcap/tidb:latest
docker run --name tidb-server -d -p 4000:4000 pingcap/tidb:latest

docker pull may take a while to download images ~560M.

Then you can use official mysql client to connect to TiDB.

mysql -h 127.0.0.1 -P 4000 -u root -D test --prompt="tidb> "  

Notice: OS X user may use docker-machine ip to connect it.

Or run TiDB on TiKV cluster

Read the documents for binary deployment or docker deployment.

Pre-requirement

Go environment. Currently a 64-bit version of go >= 1.5 is required.

git clone https://github.com/pingcap/tidb.git $GOPATH/src/github.com/pingcap/tidb
cd $GOPATH/src/github.com/pingcap/tidb
make

Run as MySQL protocol server

make
cd bin && ./tidb-server

In case you want to compile a specific location:

make server TARGET=$GOPATH/bin/tidb-server

The default server port is 4000 and can be changed by flag -P <port>.

Run ./tidb-server -h to see more flag options.

After you started tidb-server, you can use official mysql client to connect to TiDB.

mysql -h 127.0.0.1 -P 4000 -u root -D test --prompt="tidb> " 
Go
1
https://gitee.com/artlongs/tidb.git
git@gitee.com:artlongs/tidb.git
artlongs
tidb
tidb
master

搜索帮助