OceanBase
English日本語简体中文
Docs Home
Products
Integrations
Release Notes

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog ServiceOceanBase DataPilot

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog ServiceOceanBase DataPilot
OceanBase DatabaseOceanBase Cloud ToolsConnectors and MiddlewareLifecycle Support Policy

OceanBase Database

  • Overview of the ecosystem
  • ORM frameworks
    • Java
      • Spring Boot
      • Spring Batch
      • Use Spring JDBC to connect to OceanBase Database
      • Spring Data JPA
      • Hibernate
      • MyBatis
      • jOOQ
    • Python
      • Use SQLAlchemy to connect to OceanBase Database
      • Connect to OceanBase Database by using peewee
      • Use Tortoise ORM to connect to OceanBase Database
    • Go
      • Connect to OceanBase Database by using GORM
      • beego ORM
    • Rust
      • SeaORM Connection to OceanBase Database
      • Diesel Connection to OceanBase Database
    • Ruby
      • Active Record
      • Sequel Connection to OceanBase Database
      • Connect to OceanBase Database by using Ruby on Rails
    • Node.js
      • Sequelize
      • TypeORM
      • Prisma
      • Drizzle
    • C#
      • Dapper
      • SqlSugar
      • FreeSQL
    • PHP
      • Connect to OceanBase Database by using the Yii 2.0 ORM
      • Connect to OceanBase Database by using Laravel Eloquent ORM
      • CakePHP
  • Database version management
    • Liquibase
    • Flyway
  • Data integration
    • Flink
      • Apache Flink
      • Flink DirectLoad
      • Flink Connector OceanBase
    • dbt
    • SeaTunnel
    • Maxwell
    • Debezium
    • Spark Catalog
    • NiFi
    • Qlik Replicate
    • RisingWave CDC
    • Flume
    • Migrate data from SQL Server to OceanBase Database by using MySQL Workbench
  • SQL development
    • WebLogic
    • DBeaver
    • Navicat
    • DataGrip
    • TablePlus
    • DMS
  • Orchestration and scheduling
    • Airflow
    • PowerJob
    • DolphinScheduler
    • Linkis
  • Visualization tools
    • Superset
    • Excel
    • Power BI
    • Quick BI
    • Tableau
    • GuanData
    • vividime
    • DataV
    • Metabase
    • Redash
    • FineReport
  • Database management
    • NineData
    • Bytebase
    • DataHub
    • Zabbix
  • AI
    • OpenAI
    • Qwen
    • LangChain
    • LlamaIndex
    • Dify
    • n8n
    • Trae
    • SpringAI
    • Cline
    • Cursor
    • Continue
    • MCP Toolbox
    • CamelAI
    • Firecrawl
    • Hugging Face
    • Ollama
    • Google Gemini
    • Cloudflare Workers AI
    • DB GPT
    • Jina AI
    • Augment Code
    • Claude Code
    • Kiro
    • GPT4All
  • Application
    • Ghost
    • Jira
    • Seata
    • SAP Crystal Reports
  • Middleware
    • Apache Pulsar

Download PDF

Document Feedback
  1. Documentation Center
  2. OceanBase Database
  3. master

Connect to OceanBase Database in DataV and retrieve data

Last Updated:2026-09-04 07:40:45

Version compatibility
Prerequisites
Procedure
Step 1: Obtain the connection string of OceanBase Database
Step 2: Add an OceanBase data source
Verify the result

DataV is a data visualization service provided by Alibaba Cloud that supports connecting to various data sources and offers a wide range of visualization components. You can quickly build data dashboards and visualization applications in DataV. By adding an RDS for MySQL data source, you can read data from OceanBase Database and use components such as charts and maps to visualize and analyze the data.

Version compatibility

  • OceanBase Database: ≥ V4.2.1

Prerequisites

Before you use DataV, make sure that:

  • You have activated the DataV service. For more information, see DataV official documentation.
  • You have deployed OceanBase Database and created a MySQL user tenant.

Procedure

Step 1: Obtain the connection string of OceanBase Database

Contact the OceanBase Database deployment personnel to obtain the connection string. For example:

obclient -h$host -P$port -u$user_name -p$password -D$database_name

Parameter description:

  • $host: the IP address for connection. For ODP connection, use the ODP address. For direct connection, use the OBServer IP address.

  • $port: the connection port. For ODP connection, the default value is 2883. For direct connection, the default value is 2881.

  • $database_name: the database name.

    Notice

    The user who connects to the tenant must have the CREATE, INSERT, DROP, and SELECT privileges on the database.

  • $user_name: the account for connection. For ODP connection, the format is User@Tenant#Cluster or Cluster:Tenant:User. For direct connection, the format is User@Tenant.

  • $password: the password of the account.

Example:

obclient -h$host -P2881 -u$user_name -p$password -D$database_name

Step 2: Add an OceanBase data source

DataV allows you to add an OceanBase data source over the Internet or the internal network.

Method 1: Add a data source over the Internet

  1. Log in to the DataV console.

  2. In the left-side navigation pane, choose Data Source Management. On the My Data tab, click Add Data.

  3. In the Type list, select RDS for MySQL.

  4. In the Network Type list, select Internet.

  5. Specify the information of the RDS for MySQL data source. Internet configuration parameters:

    Parameter
    Description
    Name The display name of the data source. You can name it as you like.
    Domain Name The public IP address or domain name of the database. This IP address or domain name allows the DataV server to access the database over the Internet or the internal network of Alibaba Cloud in some regions. For example, if you use an Alibaba Cloud RDS for MySQL instance over the Internet, the domain name is $domain. You can click Apply for Internet Access in the details page of the tenant in the OceanBase console and add the DataV Internet IP address to the allowlist. After the IP address is activated, you can use it.
    Port The port of the database. The default value is 3306.
    Username The username for logging in to the database.
    Password The password for logging in to the database.
    Database The name of the selected database.
    insecureAuth If your MySQL version is low, you must enable this parameter to configure MySQL.
  6. After you specify the information, click OK.

  7. The added data source is displayed in the data source list.

Method 2: Add a data source over the internal network

  1. Log in to the DataV console.

  2. In the left-side navigation pane, choose Data Source Management. On the My Data tab, click Add Data.

  3. In the Type list, select RDS for MySQL.

  4. In the Network Type list, select VPC. In the Region list, select the region where the OceanBase instance is located.

  5. Specify the information of the database. VPC configuration parameters:

    Parameter
    Description
    Name The display name of the data source. You can name it as you like.
    VPC ID The ID of the VPC where the OceanBase instance is located. You can obtain this parameter by clicking the proxy address in the topology of the tenant details page in the OceanBase console. For example, if you want to access the database over the internal network, you need to obtain the VPC ID from the main address card. The VPC ID is specified in the main address card as <VPC Network: $vpc_id>.
    Instance ID The ID of the database instance in the VPC. You can obtain this parameter by clicking the proxy address in the topology of the tenant details page in the OceanBase console. For example, if you want to access the database over the internal network, you need to obtain the instance ID from the main address card. The instance ID is specified in the main address card as <Private IP Address: $instance_id>.
    Domain Name The internal IP address or domain name of the database. This IP address or domain name allows the DataV server to access the database over the Internet or the internal network of Alibaba Cloud in some regions. For example, if you use an Alibaba Cloud RDS for MySQL instance over the internal network, the domain name is $domain. You can click Configure Allowlist in the details page of the tenant in the OceanBase console and add the DataV internal network IP address to the allowlist. After the IP address is activated, you can use it.
    Port The port of the database. The default value is 3306.
    Username The username for logging in to the database.
    Password The password for logging in to the database.
    Database The name of the selected database.
    insecureAuth If your MySQL version is low, you must enable this parameter to configure MySQL.
  6. After you specify the information, the system automatically tests the connection to verify whether the database is accessible.

  7. After the test is successful, click OK.

  8. The added data source is displayed in the data source list.

Verify the result

After you add a data source, you can perform the following operations in DataV to verify the connection:

  1. Create a visualization dashboard: In the DataV console, click Create Visualization and select a template or create a blank dashboard.

  2. Add chart components: Drag and drop chart components (such as line charts, bar charts, and pie charts) from the left-side component library to the canvas.

  3. Configure Data Source: Select the chart component, and in the Data tab of the right-side configuration panel, select the added OceanBase data source.

  4. Write an SQL query: Write an SQL query in the SQL editor. For example:

    SELECT * FROM your_table LIMIT 100
    
  5. Preview the data: Click View Data Response to confirm that you can successfully retrieve data from the OceanBase database.

  6. Configure styles and interactions: Configure chart styles, colors, titles, and other settings as needed, and set interaction effects.

If the chart can display data from the OceanBase database, the connection between DataV and OceanBase is successful.

Previous topic

vividime
Last

Next topic

Metabase
Next
on this page
Version compatibility
Prerequisites
Procedure
Step 1: Obtain the connection string of OceanBase Database
Step 2: Add an OceanBase data source
Verify the result