TIDB (1): Server test Installation

Source: Internet
Author: User
Tags git clone

The text of this text connection is: http://blog.csdn.net/freewebsys/article/details/50600352 without the consent of the blogger cannot be reproduced.
Bo main address is: Http://blog.csdn.net/freewebsys

1, about TIDB

See a piece of news written about TIDB. Feel good, so download and install to see.
http://geek.csdn.net/news/detail/52122
The project code is on GitHub.


Https://github.com/pingcap/tidb
It was developed by the people of Taiwan. Inspired by Google's F1, it is supported by both RDMS and NoSQL two.
Server-side emulation MySQL protocol. But not MySQL.

2, download and install

Install Golang first. Linux64 bit, environment variable settings:
To conveniently set the Gopath directly to the Golib directory.
Version number requirements: Go >= 1.5

export GOROOT=/usr/lib/golangexport GOPATH=/usr/lib/golib

Download code:

git clone https://github.com/pingcap/tidb.git $GOPATH/src/github.com/pingcap/tidbcloning into'/usr/lib/golib/src/github.com/pingcap/tidb '...Remote:counting objects:17905, done.remote:Compressing objects: -% ( +/ +), Done.remote:Total17905(Delta the), reused0(Delta0), pack-reused17827Receiving objects: -% (17905/17905),9.30MiB |685.00KIB/S, done. Resolving deltas: -% (11821/11821), done.

Compile:

cd$GOPATH/src/github.com/pingcap/tidbmake

Then it is download dependencies, which are compiled. Long wait.
Full compile, encounter point problem.

go get github.com/golang/lint/golintvetvet --shadowgolintgofmt (simplify)plan/plans/select_list.gomake: *** [check] Error 1new mail in /var/spool/mail/root
3. Compiling the server

Because there is a problem with full compilation, it is OK to compile the server separately.

MakeServerCD tidb-Server&&./tidb-ServerWelcome toThe TiDB.Version:Git Commit Hash:482DC3F06C438C320E1FC64FF02A5479D2A989FBUTC Build Time: .- on- -  the: -: - ./ on/ -  +: -: -Kv.go:341: [INFO] [KV]NewStore/tmp/tidb ./ on/ -  +: -: - Server. Go: the: [INFO]ServerRun MYSQL Protocol Listen at [:4000]

This launches the MySQL protocol server. Just go straight when MySQL was used.

The service starts directly on the line directly.

Mysql- H 127.0. 0. 1 - P 4000 - uRoot- DTestwelcome toThe MySQL Monitor.Commands End with;or \G.Your MySQL Connection ID is10001Server version:5.5. to-tidb-1.0MySQL Community Server (GPL) Copyright (c) -, -, Oracle and/orIts affiliates.  AllRights reserved.Oracle is a registered trademark of Oracle Corporation and/orItsaffiliates.Other names trademarks of their respectiveowners.Type ' help; ' or ' \h 'For help. Type ' \c '  toClear the current input statement.Mysql>Show tables; EmptySet(0.00SEC) MySQL>CREATE TABLE' User_info '( -' uid 'bigint -) not NULLAuto_increment, -' name 'varchar -) DEFAULTNULL, -' Gender 'tinyint4) DEFAULTNULL, -PRIMARY KEY (' uid ') -) ENGINE=InnoDB DEFAULT CHARSET=UTF8; Query OK,0 rowsAffected (0.01SEC) MySQL>Insert intoUser_info (Name,gender) VALUES (' Zhang San ',1); Query OK,1Row affected (0.01SEC) MySQL>Insert intoUser_info (Name,gender) VALUES (' Zhang San ',1); Query OK,1Row affected (0.00SEC) MySQL>Insert intoUser_info (Name,gender) VALUES (' li Si ',1); Query OK,1Row affected (0.00SEC) MySQL> Select *From User_info;+-----+-----------+--------+|Uid|Name|Gender|+-----+-----------+--------+|   1 |Zhang San|      1 ||   2 |Zhang San|      1 ||   3 |Li Si|      1 |+-----+-----------+--------+3 rows inch Set(0.00SEC) MySQL>Exitbye
4. Summarize

The text of this text connection is: http://blog.csdn.net/freewebsys/article/details/50600352 without the consent of the blogger cannot be reproduced.


Bo main address is: Http://blog.csdn.net/freewebsys

Tidb feeling is still not on the train of thought still is very good.
Can simulate MySQL. The use of the difficulty is greatly reduced, at the same time performance is also the leverage.
After all, also NoSQL, data query speed, insertion speed, should be faster than MySQL,
At the same time in the case of massive data. The query is still not slow.

Yes, that's great.
Let's move on to the next step.

TIDB (1): Server test Installation

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.