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 Service

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 Service
OceanBase DatabaseOceanBase Cloud ToolsConnectors and MiddlewareLifecycle Support Policy

OceanBase Command-Line Client

V2.2.13
  • Introduction
    • Overview of OBClient
  • Quick start
    • Quick start with OBClient
  • Command-line options
    • Common OBClient command-line options
    • Reference for OBClient command-line options
    • SQL context when a script fails
  • Configuration and environment
    • Configure OBClient and set environment variables
  • User guide
    • Reference for OBClient internal commands
  • Advanced features
    • Support for Oracle-compatible mode in OBClient
    • Log in to OBClient through a socket5 proxy
    • Multi-IP connection support for OBClient
    • Client IP passthrough and tenant allowlist (F5 scenario)
    • Log in as a proxy user of OBClient
    • LOAD DATA LOCAL INFILE
    • SET variables
    • Supported login_path options for OBClient
  • Tips and troubleshooting
    • OBClient Usage Tips and Troubleshooting

Download PDF

Document Feedback
  1. Documentation Center
  2. OceanBase Command-Line Client
  3. V2.2.13

Common OBClient command-line options

Last Updated:2026-09-02 09:17:42

References

OBClient supports a rich set of command-line options. The following are the most commonly used options:

Options
Description
-h, --host=host The host to connect to. If not specified and TCP connection is used, the default value is 127.0.0.1.
-P, --port=num The port number for the connection. If not specified and a TCP connection is used, the default value 2881 is used.
-u, --user=name The username used for login. If not specified and TCP connection is used, the default is root@sys.
-p, --password[=password] The password used to connect to the server.
-D, --database=name The database to be used.
-A, --no-auto-rehash No automatic rehashing, enabling faster OBClient startup.
-B, --batch Use tabs as column separators to print results, suitable for batch processing mode.
-e, --execute=name Execute the statement and exit.
-q, --quick Results are not cached and are printed line by line.
-s, --silent Quieter output mode.
-t, --table The output is displayed in a table format.
-E, --vertical Vertically print the query output.
-v, --verbose Write more information.
-V, --version Output the version information and exit.
-?, --help Displays help information and exits.
--login-path=name Log in using the login_path.
--safe-updates Enable safe update mode to prevent accidental deletion or update of all rows.
--local-infile Enable or disableLOAD DATA INFILEof the LOCAL feature.

Notice

On Unix systems, localhost and 127.0.0.1 have different connection behaviors. When using localhost, OBClient attempts to use a Unix socket connection; when using 127.0.0.1, OBClient uses a TCP/IP connection. If your server listens only on TCP/IP ports, use 127.0.0.1 or the actual IP address.

References

  • Product overview
  • Command-line options reference
  • --error-sql (Script error SQL context)
  • Quick start

Previous topic

Quick start with OBClient
Last

Next topic

Reference for OBClient command-line options
Next
on this page
References