Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The first experience of TiDB

2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Deploying TiDB is the first lesson in front of us, in fact, there are many ways to deploy, limited to the environment, I first began to think about how to deploy the stand-alone version.

If you want to deploy in the version of Centos 6, this is still quite difficult, and there will be a lot of unknown holes, according to the official suggestion, it is necessary to be in the version of Centos 7 or above, otherwise the version of glibc will soon encounter problems.

Let's install a set of Centos7 and try it out with a quick stand-alone deployment.

Get the binary package, which is about more than 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 do information matching to check whether the file is verified correctly. Sha256sum-c tidb-latest-linux-amd64.sha256 decompresses the file. Tar-xzf tidb-latest-linux-amd64.tar.gz [root@localhost tidb] # cd tidb-latest-linux-amd64 launch PD [root@localhost tidb-latest-linux-amd64] #. / bin/pd-server-- data-dir=pd-- log-file=pd.log & the critical step is to start tikv, where the vast majority of deployments fail. [root@localhost tidb-latest-linux-amd64] #. / bin/tikv-server-- pd= "127.0.0.1 pd= 2379"-- data-dir=tikv-- log-file=tikv.log & launch tidb-server [root@localhost tidb-latest-linux-amd64] #. / bin/tidb-server-- store=tikv-- path= "127.0.0.1 data-dir=tikv 2379"-- log-file=tidb.log & use mysql to log in: [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. Start to experience 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: testCurrent user: root@127.0.0.1 SSL: Not in useCurrent pager: stdoutUsing outfile:''Using delimiter: Server: MySQLServer 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/IPServer characterset: latin1Db characterset: utf8Client characterset: utf8Conn. Characterset: utf8TCP port: 4000-View the corresponding database list. 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-ge38f406Git Commit Hash : e38f4067569152dd0acb233b4a8e0cc05644dee1Git Branch: masterUTC Build Time: 2018-03-11 08:28:59 GoVersion: go version go1.10 linux/amd64TiKV 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\ GERROR 1105 (HY000): line 1 column 11 near "status" (total length 18) MySQL [test] > show slave status\ GERROR 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 |

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report