Skip to content

Commit e88ba4c

Browse files
committed
Merge pull request #579 from pingcap/coocood/extract-quickstart
docs: extract quick start section to its own file.
2 parents 4a6348c + e228879 commit e88ba4c

File tree

3 files changed

+74
-68
lines changed

3 files changed

+74
-68
lines changed

README.md

Lines changed: 2 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -31,77 +31,11 @@ __Please do not use it in production.__
3131

3232
## Roadmap
3333

34-
Read the [Roadmap](./ROADMAP.md).
34+
Read the [Roadmap](./docs/ROADMAP.md).
3535

3636
## Quick start
3737

38-
39-
#### Run tidb with docker
40-
41-
You can quickly test tidb with docker, the source repository contains Dockerfile,
42-
You can build docker and then run a docker container with tidb.
43-
To install docker on your system, you can read the document on https://docs.docker.com/
44-
45-
46-
```
47-
git clone https://github.com/pingcap/tidb.git
48-
cd tidb
49-
docker build --rm -t tidb-server .
50-
docker images
51-
docker run -d -p 4000:4000 --name tidb-server tidb-server
52-
```
53-
Then you can connect 127.0.0.1:4000 by mysql client or telnet.
54-
The tidb is ready for serving.
55-
56-
#### __Pre-requirement__
57-
58-
Go environment. Currently a 64-bit version of go >= 1.5 is required.
59-
```
60-
git clone https://github.com/pingcap/tidb.git $GOPATH/src/github.com/pingcap/tidb
61-
cd $GOPATH/src/github.com/pingcap/tidb
62-
make
63-
```
64-
65-
#### __Run command line interpreter__
66-
67-
Interpreter is an interactive command line TiDB client.
68-
You can just enter some SQL statements and get the result.
69-
```
70-
make interpreter
71-
cd interpreter && ./interpreter
72-
```
73-
Press `Ctrl+C` to quit.
74-
75-
#### __Run as go library__
76-
77-
See [USAGE.md](./docs/USAGE.md) for detailed instructions to use TiDB as library in Go code.
78-
79-
#### __Run as MySQL protocol server__
80-
81-
```
82-
make server
83-
cd tidb-server && ./tidb-server
84-
```
85-
86-
In case you want to compile a specific location:
87-
88-
```
89-
make server TARGET=$GOPATH/bin/tidb-server
90-
```
91-
92-
The default server port is `4000` and can be changed by flag `-P <port>`.
93-
94-
Run `./tidb-server -h` to see more flag options.
95-
96-
After you started tidb-server, you can use official mysql client to connect to TiDB.
97-
98-
```
99-
mysql -h 127.0.0.1 -P 4000 -u root -D test
100-
```
101-
102-
#### __Run as MySQL protocol server with distributed transactional KV storage engine__
103-
104-
Comming soon.
38+
Read the [Quick Start](./docs/QUICKSTART.md)
10539

10640
## Architecture
10741

docs/QUICKSTART.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Quick Start
2+
3+
#### Run tidb with docker
4+
5+
You can quickly test tidb with docker, the source repository contains the Dockerfile,
6+
You can build TiDB docker image and then run TiDB in a docker container.
7+
8+
To install docker on your system, you can read the document on https://docs.docker.com/
9+
10+
```
11+
git clone https://github.com/pingcap/tidb.git
12+
cd tidb
13+
docker build --rm -t tidb-server .
14+
docker images
15+
docker run -d -p 4000:4000 --name tidb-server tidb-server
16+
```
17+
18+
Then you can use official mysql client to connect to TiDB.
19+
20+
```
21+
mysql -h 127.0.0.1 -P 4000 -u root -D test
22+
```
23+
24+
#### __Pre-requirement__
25+
26+
Go environment. Currently a 64-bit version of go >= 1.5 is required.
27+
```
28+
git clone https://github.com/pingcap/tidb.git $GOPATH/src/github.com/pingcap/tidb
29+
cd $GOPATH/src/github.com/pingcap/tidb
30+
make
31+
```
32+
33+
#### __Run command line interpreter__
34+
35+
Interpreter is an interactive command line TiDB client.
36+
You can just enter some SQL statements and get the result.
37+
```
38+
make interpreter
39+
cd interpreter && ./interpreter
40+
```
41+
Press `Ctrl+C` to quit.
42+
43+
#### __Run as go library__
44+
45+
See [USAGE.md](./USAGE.md) for detailed instructions to use TiDB as library in Go code.
46+
47+
#### __Run as MySQL protocol server__
48+
49+
```
50+
make server
51+
cd tidb-server && ./tidb-server
52+
```
53+
54+
In case you want to compile a specific location:
55+
56+
```
57+
make server TARGET=$GOPATH/bin/tidb-server
58+
```
59+
60+
The default server port is `4000` and can be changed by flag `-P <port>`.
61+
62+
Run `./tidb-server -h` to see more flag options.
63+
64+
After you started tidb-server, you can use official mysql client to connect to TiDB.
65+
66+
```
67+
mysql -h 127.0.0.1 -P 4000 -u root -D test
68+
```
69+
70+
#### __Run as MySQL protocol server with distributed transactional KV storage engine__
71+
72+
Comming soon.
File renamed without changes.

0 commit comments

Comments
 (0)