国产银河麒麟V10SP1系统下搭建TiDB数据库操作步骤图文

开发目的:在国产银河麒麟系统中搭建TiDB数据库运行环境。

开发工具:银河麒麟系统V10SP1+TiDB+MySql数据库8.0。

具体步骤:

1、在VmWare虚拟机中安装好国产银河麒麟V10Sp1操作系统。

2、打开终端命令,安装TiDB相关软件:

检测更新:sudo apt update

安装curl工具包:sudo apt-get install curl

执行安装命令:curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh

刷新当前用户配置:source /home/userlpe/.bashrc

执行命令:tiup playground

浏览器打开http://127.0.0.1:2379/dashboard 访问 TiDB Dashboard 页面,默认用户名为 root,密码为空

浏览器打开http://127.0.0.1:3000 访问 TiDB 的 Grafana 界面,默认用户名和密码都为 admin。

3、 安装MySql数据库相关软件:

安装net-tools工具包:sudo apt-get install net-tools

 安装rpm工具包:sudo apt-get install rpm

安装alien工具包:sudo apt-get install alien

下载mysql数据库对应安装包,下载地址:https://downloads.mysql.com/archives/community/。

选择下载 Red Hat Enterprise Linux 8 / Oracle Linux 8 (x86, 64-bit), RPM Bundle安装包

解压下载的安装文件:tar xvf mysql-8.3.0-1.el8.x86_64.rpm-bundle.tar

将mysql安装包对应的rpm转换成deb格式
sudo alien -d mysql-community-common-8.3.0-1.el8.x86_64.rpm
sudo alien -d mysql-community-client-plugins-8.3.0-1.el8.x86_64.rpm
sudo alien -d mysql-community-libs-8.3.0-1.el8.x86_64.rpm
sudo alien -d mysql-community-client-8.3.0-1.el8.x86_64.rpm
sudo alien -d mysql-community-icu-data-files-8.3.0-1.el8.x86_64.rpm
sudo alien -d  mysql-community-server-8.3.0-1.el8.x86_64.rpm
sudo alien -d  mysql-community-devel-8.3.0-1.el8.x86_64.rpm

执行命令安装deb格式文件
sudo dpkg -i mysql-community-common_8.3.0-2_amd64.deb  
sudo dpkg -i mysql-community-client-plugins_8.3.0-2_amd64.deb  
sudo dpkg -i mysql-community-libs_8.3.0-2_amd64.deb   
sudo dpkg -i mysql-community-client_8.3.0-2_amd64.deb       
sudo dpkg -i mysql-community-icu-data-files_8.3.0-2_amd64.deb  
sudo dpkg -i mysql-community-server_8.3.0-2_amd64.deb
sudo dpkg -i mysql-community-devel_8.3.0-2_amd64.deb   

连接mysql数据库指令
mysql --comments --host 127.0.0.1 --port 4000 -u root
测试mysql 数据库操作
userlpe@userlpe-XQF222:~/下载$ mysql --comments --host 127.0.0.1 --port 4000 -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3642753032
Server version: 8.0.11-TiDB-v8.0.0 TiDB Server (Apache License 2.0) Community Edition, MySQL 8.0 compatible

Copyright (c) 2000, 2024, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| INFORMATION_SCHEMA |
| METRICS_SCHEMA     |
| PERFORMANCE_SCHEMA |
| mysql              |
| sys                |
| test               |
+--------------------+
6 rows in set (0.00 sec)
更新mysql数据库密码
mysql> update mysql.user set authentication_string=password('abc123456') where user='root' ;
Query OK, 1 row affected, 1 warning (0.06 sec)
Rows matched: 1  Changed: 1  Warnings: 1

更新mysql密码后,登录TiDB管理界面http://127.0.0.1:2379/dashboard/#/cluster_info/instance时候需要重新输入root用户对应的密码,进入管理界面后能看到对应的所有执行的增删改查SQL语句。

至此基本完成国产数据库TiDB的搭建过程。

  • 17
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

疾风铸境

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值