TiDB初體驗

TiDB 初體驗

部署TiDB就是擺在我們面前的第一節(jié)課,其實有很多的部署方式,限于環(huán)境,我先開始琢磨單機版如何部署。

讓客戶滿意是我們工作的目標(biāo),不斷超越客戶的期望值來自于我們對這個行業(yè)的熱愛。我們立志把好的技術(shù)通過有效、簡單的方式提供給客戶,將通過不懈努力成為客戶在信息化領(lǐng)域值得信任、有價值的長期合作伙伴,公司提供的服務(wù)項目有:域名申請、虛擬主機、營銷軟件、網(wǎng)站建設(shè)、六合網(wǎng)站維護、網(wǎng)站推廣。

在Centos 6的版本中如果要部署,這個難度還是比較大的,而且會有很多未知的坑,根據(jù)官方的建議,是需要在Centos 7以上的版本中,否則glibc的版本問題會很快碰到。

我們安裝一套Centos7,采用快速的單機部署的方式來嘗鮮。

得到二進制的包,大概是100多M.

[root@localhost ~]# wget http://download.pingcap.org/tidb-latest-linux-amd64.tar.gz [root@localhost tidb]# wget http://download.pingcap.org/tidb-latest-linux-amd64.sha256
做信息匹配,查看文件的校驗是否正確。
sha256sum -c tidb-latest-linux-amd64.sha256
解壓文件。
tar -xzf tidb-latest-linux-amd64.tar.gz [root@localhost tidb]# cd tidb-latest-linux-amd64
啟動PD [root@localhost tidb-latest-linux-amd64]# ./bin/pd-server --data-dir=pd --log-file=pd.log & 關(guān)鍵的步驟來了,啟動tikv,絕大多數(shù)的部署都是在這個步驟失敗。 [root@localhost tidb-latest-linux-amd64]# ./bin/tikv-server --pd="127.0.0.1:2379" --data-dir=tikv --log-file=tikv.log & 啟動tidb-server [root@localhost tidb-latest-linux-amd64]# ./bin/tidb-server --store=tikv --path="127.0.0.1:2379" --log-file=tidb.log & 使用MySQL的方式來登錄: [root@localhost tidb-latest-linux-amd64]# mysql -h 127.0.0.1 -P 4000 -u root -D test 
Welcome to the MariaDB monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.7.1-TiDB-v2.0.0-rc.1-6-ge38f406 MySQL Community Server (Apache License 2.0) Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. 開始體驗一把
MySQL [test]> \s -------------- mysql  Ver 15.1 Distrib 5.5.56-MariaDB, for Linux (x86_64) using readline 5.1 Connection id: 2 Current database: test
Current user: root@127.0.0.1 SSL: Not in use
Current pager: stdout
Using outfile: '' Using delimiter: ; Server: MySQL
Server version: 5.7.1-TiDB-v2.0.0-rc.1-6-ge38f406 MySQL Community Server (Apache License 2.0) Protocol version: 10 Connection: 127.0.0.1 via TCP/IP
Server characterset: latin1
Db     characterset: utf8
Client characterset: utf8
Conn. characterset: utf8
TCP port: 4000 -------------- 查看對應(yīng)的數(shù)據(jù)庫列表。

MySQL [test]> show databases; +--------------------+ | Database | +--------------------+ | INFORMATION_SCHEMA | | PERFORMANCE_SCHEMA | | mysql | | test | +--------------------+ 4 rows in set (0.00 sec) MySQL [test]> select tidb_version(); +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | tidb_version() | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Release Version: v2.0.0-rc.1-6-ge38f406
Git Commit Hash: e38f4067569152dd0acb233b4a8e0cc05644dee1
Git Branch: master
UTC Build Time: 2018-03-11 08:28:59 GoVersion: go version go1.10 linux/amd64
TiKV Min Version: 1.1.0-dev.2 | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.04 sec) MySQL [test]> select version(); +-----------------------------------+ | version() | +-----------------------------------+ | 5.7.1-TiDB-v2.0.0-rc.1-6-ge38f406 | +-----------------------------------+ 1 row in set (0.00 sec) MySQL [test]> select user,host from mysql.user; +------+------+ | user | host | +------+------+ | root | % | +------+------+ 1 row in set (0.00 sec) MySQL [test]> show master status\G
ERROR 1105 (HY000): line 1 column 11 near " status" (total length 18) MySQL [test]> show slave status\G
ERROR 1105 (HY000): line 1 column 10 near " status" (total length 17) MySQL [test]> MySQL [test]> show binary logs; ERROR 1105 (HY000): line 1 column 11 near " logs" (total length 16) MySQL [test]> show variables like '%innodb%'; +------------------------------------------+------------------------+ | Variable_name | Value | +------------------------------------------+------------------------+ | innodb_locks_unsafe_for_binlog | OFF | | innodb_api_enable_mdl | OFF | | innodb_use_native_aio | OFF |

新聞標(biāo)題:TiDB初體驗
本文路徑:http://bm7419.com/article6/godhig.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供動態(tài)網(wǎng)站、App設(shè)計、響應(yīng)式網(wǎng)站、企業(yè)網(wǎng)站制作、網(wǎng)站營銷虛擬主機

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

猜你還喜歡下面的內(nèi)容

成都網(wǎng)站建設(shè)

定制開發(fā)知識

各行業(yè)網(wǎng)站