—>
源创宝库吧 新一代精品资源网 在线工具箱 ⚡3BBS论坛 - 发现更多有趣的⚡ SanS三石导航页 此位置招租 此位置招租 此位置招租 此位置招租 ⚡3BBS论坛 - 发现更多有趣的⚡ 此位置招租 此位置招租 此位置招租 此位置招租 此位置招租 ⚡3BBS论坛 - 发现更多有趣的⚡ 此位置招租 此位置招租 此位置招租 此位置招租 此位置招租 ⚡3BBS论坛 - 发现更多有趣的⚡ 此位置招租 此位置招租 此位置招租
返回列表 发布新帖
查看: 120|回复: 1

[技术交流] Linux上OcenBase单机版部署及基本信息查询

  离线 
灌水成绩
2193
16678
22770
主题
回帖
积分

等级头衔
UID : 79
等级 : 超级版主

积分成就
威望 : 1018 点
贡献 : 2436 点
蛋壳 : 21992 枚
在线时间 : 3266 小时
注册时间 : 2024-4-13
最后登录 : 2024-10-10

荣誉勋章

荣誉会员帅哥认证最佳新人活跃会员灌水之王实习版主推广达人宣传达人论坛元老热心会员优秀作者优秀版主超级版主部落真神挂机之王

发表于 2024-5-2 01:46:58 | 查看全部 |阅读模式 来自: 中国–上海–上海–松江区

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
OceanBase单机版部署可以通过在线和离线两种方式部署。在线部署可以通过yum源或者apt源部署,直接拉取官方源码即可。实际使用中,大部分环境连不了外网,本文介绍离线方式安装。
  下载“OceanBase All in One”离线安装包下载官方地址:
游客,如果您要查看本帖隐藏内容请回复

1. 解压安装包
  1. [root@tidb01 db_ob]# ll
  2. -rwxr-xr-x 1 root root 692947447 May 1 19:23 oceanbase-all-in-one-4.3.0.1-100000242024032211.el7.x86_64.tar.gz
  3. [root@tidb01 db_ob]# tar -xzvf oceanbase-all-in-one-4.3.0.1-100000242024032211.el7.x86_64.tar.gz
  4. [root@tidb01 db_ob]# ll
  5. total 676708
  6. drwxr-xr-x 6 root root 88 Mar 29 11:46 oceanbase-all-in-one
  7. -rwxr-xr-x 1 root root 692947447 May 1 19:23 oceanbase-all-in-one-4.3.0.1-100000242024032211.el7.x86_64.tar.gz
复制代码

2. 一键部署并添加到系统环境变量
  1. [root@tidb01 db_ob]# cd oceanbase-all-in-one/bin/
  2. [root@tidb01 bin]# ./install.sh
  3. [root@tidb01 bin]# source ~/.oceanbase-all-in-one/bin/env.sh
  4. [root@tidb01 bin]# obd demo
复制代码

3. 连接数据库
  1. #通过2881端口直连数据库
  2. [root@tidb01 ~]# obclient -h127.0.0.1 -P2881 -uroot@sys -Doceanbase -A
  3. Welcome to the OceanBase. Commands end with ; or \g.
  4. Your OceanBase connection id is 3221497482
  5. Server version: OceanBase_CE 4.3.0.1 (r100000242024032211-0193a343bc60b4699ec47792c3fc4ce166a182f9) (Built Mar 22 2024 13:19:48)

  6. Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved.

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

  8. obclient [oceanbase]>

  9. #通过ODP代理访问数据库
  10. [root@tidb01 ~]# obclient -h127.0.0.1 -P2883 -uroot@sys -Doceanbase -A
  11. Welcome to the OceanBase. Commands end with ; or \g.
  12. Your OceanBase connection id is 1815347202
  13. Server version: OceanBase_CE 4.3.0.1 (r100000242024032211-0193a343bc60b4699ec47792c3fc4ce166a182f9) (Built Mar 22 2024 13:19:48)

  14. Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved.

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

  16. obclient [oceanbase]>
复制代码

4. 查询数据库版本、字符集等基本信息
  1. obclient [oceanbase]> SELECT VERSION();
  2. +------------------------------+
  3. | VERSION() |
  4. +------------------------------+
  5. | 5.7.25-OceanBase_CE-v4.3.0.1 |
  6. +------------------------------+
  7. 1 row in set (0.002 sec)

  8. obclient [oceanbase]>

  9. #查看字符集
  10. obclient [oceanbase]> SHOW SESSION VARIABLES LIKE 'character\_set\_%';
  11. +--------------------------+---------+
  12. | Variable_name | Value |
  13. +--------------------------+---------+
  14. | character_set_client | utf8mb4 |
  15. | character_set_connection | utf8mb4 |
  16. | character_set_database | utf8mb4 |
  17. | character_set_filesystem | binary |
  18. | character_set_results | utf8mb4 |
  19. | character_set_server | utf8mb4 |
  20. | character_set_system | utf8mb4 |
  21. +--------------------------+---------+
  22. 7 rows in set (0.003 sec)
  23. obclient [oceanbase]> SHOW SESSION VARIABLES LIKE 'collation\_%';
  24. +----------------------+--------------------+
  25. | Variable_name | Value |
  26. +----------------------+--------------------+
  27. | collation_connection | utf8mb4_general_ci |
  28. | collation_database | utf8mb4_general_ci |
  29. | collation_server | utf8mb4_general_ci |
  30. +----------------------+--------------------+
  31. 3 rows in set (0.003 sec)
复制代码

版权声明:本文为博客园博主原创文章,遵循 CC 4.0 BY-SA 版权协议
要么刷卡,要么投币,要么滚蛋。看什么看!公交车都坐不起,还冒充黑客帝国。
  离线 
灌水成绩
2193
16678
22770
主题
回帖
积分

等级头衔
UID : 79
等级 : 超级版主

积分成就
威望 : 1018 点
贡献 : 2436 点
蛋壳 : 21992 枚
在线时间 : 3266 小时
注册时间 : 2024-4-13
最后登录 : 2024-10-10

荣誉勋章

荣誉会员帅哥认证最佳新人活跃会员灌水之王实习版主推广达人宣传达人论坛元老热心会员优秀作者优秀版主超级版主部落真神挂机之王

 楼主| 发表于 2024-7-4 18:10:44 | 查看全部 来自: 中国–上海–上海
滴~老年卡,打卡成功!楼主辛苦了,祝楼主:财源滚滚🧡,打卡时间:2024年07月04日 18:10:44
新帖通知群(钉钉群):点击查看
荷包蛋部落(QQ群):荷包蛋部落 - HBD0.CN
💥荷包蛋联盟-免费的自助广告-为广大用户提供宣传服务!💯
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

1楼
2楼
投诉/建议联系

8641340@qq.com

欢迎各位朋友加入本社区,
共同维护良好的社区氛围
  • QQ用户交流群
  • 钉钉新帖推送群
Powered by Discuz! X3.5 Licensed  Copyright © 2001-2024 荷包蛋部落 版权所有 All Rights Reserved. 鲁ICP备20023396号-6
关灯 在本版发帖
加入钉钉新帖推送群
QQ客服返回顶部
快速回复 返回顶部 返回列表