TiDB 初体验
发表于:2025-11-14 作者:千家信息网编辑
千家信息网最后更新 2025年11月14日,部署TiDB就是摆在我们面前的第一节课,其实有很多的部署方式,限于环境,我先开始琢磨单机版如何部署。在Centos 6的版本中如果要部署,这个难度还是比较大的,而且会有很多未知的坑,根据官方的建议,是
千家信息网最后更新 2025年11月14日TiDB 初体验
部署TiDB就是摆在我们面前的第一节课,其实有很多的部署方式,限于环境,我先开始琢磨单机版如何部署。
在Centos 6的版本中如果要部署,这个难度还是比较大的,而且会有很多未知的坑,根据官方的建议,是需要在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 & 关键的步骤来了,启动tikv,绝大多数的部署都是在这个步骤失败。 [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: 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 -------------- 查看对应的数据库列表。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 |
方式
版本
单机
文件
步骤
体验
二进制
信息
关键
单机版
官方
就是
建议
很快
数据
数据库
是在
环境
还是
问题
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
互联网科技的税收是多少
广电网络技术的发展
企业独立服务器网站
中国引文数据库如何登陆
互联网网络技术专业介绍
IP网络技术中
fmt2021怎么打数据库补丁
微信小程序用不用连接数据库
软件开发技术总结报告
数据库原理很难吗
国内知名软件开发厂家
数据库效率软件
中国移动人工智能服务器中标公司
网络安全属于技术活吗
网络安全手抄报边框简约
网络安全保障书责任书承诺书
hp 服务器 光驱启动
政务云平台服务器安全
质量部需要哪些数据库
网络安全和信息保障
30台服务器集群
网络安全活动队会记录
信息安全与网络安全一样吗
哈密软件开发费用是多少
自闭症软件开发
保险数据库被
服务器管理器添加用户的命令
广电网络安全传输
网安通报网络安全
陷入式软件开发