Giter Site home page Giter Site logo

oceanbase / obclient Goto Github PK

View Code? Open in Web Editor NEW
82.0 82.0 43.0 113.04 MB

A MariaDB-based command line tool to connect to OceanBase Database.

Home Page: https://open.oceanbase.com

License: GNU General Public License v2.0

Shell 0.97% CMake 0.74% Makefile 0.04% C 41.34% C++ 51.67% Perl 0.61% Roff 0.83% Pascal 0.29% DTrace 0.03% Batchfile 0.02% M4 0.09% HTML 0.99% XS 0.02% Objective-C 0.60% PowerShell 0.01% Yacc 1.45% Java 0.07% Lex 0.02% SWIG 0.02% NASL 0.22%

obclient's Introduction

OceanBase Logo

English doc Chinese doc last commit stars building status license

Join Slack Stack Overflow

English | 中文版

OceanBase Database is a distributed relational database. It is developed entirely by Ant Group. The OceanBase Database is built on a common server cluster. Based on the Paxos protocol and its distributed structure, the OceanBase Database provides high availability and linear scalability. The OceanBase Database is not dependent on specific hardware architectures.

Key features

  • Transparent Scalability: 1,500 nodes, PB data and a trillion rows of records in one cluster.
  • Ultra-fast Performance: TPC-C 707 million tmpC and TPC-H 15.26 million QphH @30000GB.
  • Cost Efficiency: saves 70%–90% of storage costs.
  • Real-time Analytics: supports HTAP without additional cost.
  • Continuous Availability: RPO = 0(zero data loss) and RTO < 8s(recovery time)
  • MySQL Compatible: easily migrated from MySQL database.

See also key features for more details.

Quick start

🔥 Start with all-in-one

You can quickly deploy a stand-alone OceanBase Database to experience with the following commands:

Note: Linux Only

# download and install all-in-one package (internet connection is required)
bash -c "$(curl -s https://obbusiness-private.oss-cn-shanghai.aliyuncs.com/download-center/opensource/oceanbase-all-in-one/installer.sh)"
source ~/.oceanbase-all-in-one/bin/env.sh

# quickly deploy OceanBase database
obd demo

🐳 Start with docker

  1. Start an OceanBase Database instance:

    # Deploy a mini standalone instance.
    docker run -p 2881:2881 --name oceanbase-ce -e MODE=mini -d oceanbase/oceanbase-ce
  2. Connect to the OceanBase Database instance:

    docker exec -it oceanbase-ce ob-mysql sys # Connect to the root user of the sys tenant.

See also Quick experience or Quick Start (Simplified Chinese) for more details.

☸️ Start with Kubernetes

You can deploy and manage OceanBase Database instance in kubernetes cluster with ob-operator quickly. Refer to the document Quick Start for ob-operator to see details.

👨‍💻 Start developing

See OceanBase Developer Document to learn how to compile and deploy a manually compiled observer.

Roadmap

For future plans, see Product Iteration Progress. See also OceanBase Roadmap for more details.

Case study

OceanBase has been serving more than 1000 customers and upgraded their database from different industries, including Financial Services, Telecom, Retail, Internet, and more.

See also success stories and Who is using OceanBase for more details.

System architecture

Introduction to system architecture

Contributing

Contributions are highly appreciated. Read the development guide to get started.

License

OceanBase Database is licensed under the Mulan Public License, Version 2. See the LICENSE file for more info.

Community

Join the OceanBase community via:

obclient's People

Contributors

amber1990zhang avatar fireatoms avatar itachi482244 avatar mizuhahimuraki avatar oceanbase-admin avatar shenchai avatar wangqs12 avatar wangzelin19961202 avatar zhiyunzdw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

obclient's Issues

[Doc]: Add document to show how to install

Description

Please add document to show how to install obclient.

Documentation links

The obclient is included in the all-in-one OceanBase package. However, it would be better to provide users with instructions on how to install the all-in-one package. Please add a link to the document that explains how to install OceanBase.

Additional context

No response

[Feature]: Permanently change the NLS_DATE_FORMAT setting

Describe your use case

It is recommended that obclient first try to read OB related settings from the operating system environment variable NLS_DATE_FORMAT.
See Oracle sqlplus behavior.

When the operating system does not set the time display format, select sysdate from dual; output:
11-March-24

After operating system configuration variables
export NLS_DATE_FORMAT="yyyy-mm-dd hh24:mi:ss"
export NLS_TIMESTAMP_FORMAT="yyyy-mm-dd hh24:mi:ss"

select sysdate from dual; PLSQL, sqlplus output SYSDATE:
2024-03-11 13:05:31

Avoid script execution after obclient login database connection:
ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS';
ALTER SESSION SET NLS_TIMESTAMP_FORMAT='YYYY-MM-DD HH24:MI:SS.FF6';

Describe the solution you'd like

I'm not sure how PLSQL DEVELOPER and SQLplus read related variables when obclient starts.

Describe alternatives you've considered

No response

Additional context

No response

键盘输入异常

系统:Ubuntu 20.04.5 LTS
内核版本:5.15.0-50-generic
OceanBase版本:开源3.1.1
obclient版本:Ver Distrib 10.4.18-MariaDB, for Linux (x86_64) using readline 5.1

遇到了和 #8 类似的问题。使用obclient -uxxx@xxx -h127.0.0.1 -P 2881 -c -Doceanbase连接到observer后敲击功能键会输出空格。使用mysql-client测试过以后,并没有发现同样的问题。

Linux命令行登录OceanBase输入use命令导致键盘异常

系统:Ubuntu 18.04.5 LTS
OceanBase版本:开源3.1.1
obclient版本:2.0.0-2

问题描述:
登录数据库 obclient -h *** -P2883 -uroot@sys;
输入命令 use;
然后敲击delete、Backspace、Ctrl+delete、Ctrl+backspace、方向键等均会打出空格,最多能打出4个空格;把键序列改成ASCII127之后,敲击delete、Backspace、Ctrl+delete、Ctrl+backspace会打出乱码字符。

[Bug]: [OBClient 2.2.3] "\G" could not mark the end of sql statements in some cases

Describe the bug

\G 放到末行尾 不会触发自动执行:
image

\G 单独放到下面一行 就可以触发自动执行的:
image

Environment

[[email protected] /home/admin]$ obclient -V
obclient Ver 2.2.3 Distrib 10.4.18-MariaDB, for Linux (x86_64) using readline 5.1

[[email protected] /home/admin]$ rpm -qa | grep obclient
libobclient-2.2.2-20230315104242.el7.x86_64
obclient-2.2.3-20230808103716.el7.x86_64

Fast reproduce steps

select
p.*
from
SYS.ALL_VIRTUAL_PART_AGENT p,
SYS.ALL_VIRTUAL_TABLE_AGENT tab ,
SYS.ALL_VIRTUAL_DATABASE_AGENT db
where
db.DATABASE_ID = tab.DATABASE_ID
and tab.DATABASE_ID = db.DATABASE_ID
and p.TABLE_ID = tab.TABLE_ID
and db.DATABASE_NAME = 'SYS'
and tab.TABLE_NAME = 'T2_M_LH'
and p.PART_NAME = 'P1'

Expected behavior

No response

Actual behavior

No response

Additional context

No response

[Bug]: need support on OpenSUSE15 and FedoraOS 37

Check Before Asking

  • Please check the issue list and confirm this bug is encountered for the first time.
  • Please try full text in English and attach precise description.

Environment

OpenSUSE 15
FedoraOS37

in these two OSes, I cannot build or install obclient successfully.

Fast Reproduce Steps

I tried below method
method1:

sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://mirrors.aliyun.com/oceanbase/OceanBase.repo
sudo yum install -y libtool libaio obclient
[root@amd2 wayne]# yum install -y libtool libaio obclient
OceanBase-community-stable-el37                                                                                                                                                                                                                                                    1.7 kB/s | 2.3 kB     00:01    
Errors during downloading metadata for repository 'oceanbase.community.stable':
  - Status code: 404 for http://mirrors.aliyun.com/oceanbase/community/stable/el/37/x86_64/repodata/repomd.xml (IP: 47.246.24.240)
Error: Failed to download metadata for repo 'oceanbase.community.stable': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
OceanBase-development-kit-el37                                                                                                                                                                                                                                                     1.2 kB/s | 2.3 kB     00:01    
Errors during downloading metadata for repository 'oceanbase.development-kit':
  - Status code: 404 for http://mirrors.aliyun.com/oceanbase/development-kit/el/37/x86_64/repodata/repomd.xml (IP: 47.246.24.238)
Error: Failed to download metadata for repo 'oceanbase.development-kit': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Ignoring repositories: oceanbase.community.stable, oceanbase.development-kit
Last metadata expiration check: 0:22:58 ago on Sat 18 Mar 2023 07:26:05 AM PDT.
Package libtool-2.4.7-2.fc37.x86_64 is already installed.
Package libaio-0.3.111-14.fc37.x86_64 is already installed.
No match for argument: obclient

method2: try to build code

[root@amd2 rpm]# sh obclient-build.sh
[BUILD] args: TOP_DIR=/mnt/nvme3n1/wayne/obclient/rpm/../ PACKAGE=obclient VERSION=2.2.1 RELEASE=1
check dependencies profile for el3.x86_64... NOT FOUND
dep create failed
[root@amd2 rpm]# 

Actual Behavior

either way is not OK to build install obclient

Expected Behavior

we can install and build obclient on OpenSUSE and FedoraOS37

Other Information

No response

希望支持类似MySQL的\help语法

在MySQL里,类似下面的用法

mysql> \help select
Name: 'SELECT'
Description:
Syntax:
SELECT
    [ALL | DISTINCT | DISTINCTROW ]
    [HIGH_PRIORITY]
...
SELECT can also be used to retrieve rows computed without reference to
any table.

URL: https://dev.mysql.com/doc/refman/8.0/en/select.html

建议在obclient中也能支持。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.