OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

OceanBase Connector/C

V2.0.0

  • Overview
  • Installation guide
  • User Guide
    • Basic data structures
    • Basic operations
      • Basic API operations
      • API operations on prepared statements
  • C API functions
    • Overview
    • my_init()
    • mysql_affected_rows()
    • mysql_autocommit()
    • mysql_change_user()
    • mysql_character_set_name()
    • mysql_client_find_plugin()
    • mysql_client_register_plugin()
    • mysql_close()
    • mysql_commit()
    • mysql_connect()
    • mysql_create_db()
    • mysql_data_seek()
    • mysql_debug()
    • mysql_drop_db()
    • mysql_dump_debug_info()
    • mysql_eof()
    • mysql_errno()
    • mysql_error()
    • mysql_escape_string()
    • mysql_fetch_field()
    • mysql_fetch_field_direct()
    • mysql_fetch_fields()
    • mysql_fetch_lengths()
    • mysql_fetch_row()
    • mysql_field_count()
    • mysql_field_seek()
    • mysql_field_tell()
    • mysql_free_result()
    • mysql_get_character_set_info()
    • mysql_get_client_info()
    • mysql_get_client_version()
    • mysql_get_host_info()
    • mysql_get_proto_info()
    • mysql_get_server_info()
    • mysql_get_server_version()
    • mysql_get_ssl_cipher()
    • mysql_hex_string()
    • mysql_info()
    • mysql_init()
    • mysql_insert_id()
    • mysql_kill()
    • mysql_library_end()
    • mysql_library_init()
    • mysql_list_dbs()
    • mysql_list_fields()
    • mysql_list_processes()
    • mysql_list_tables()
    • mysql_load_plugin()
    • mysql_load_plugin_v()
    • mysql_more_results()
    • mysql_next_result()
    • mysql_num_fields()
    • mysql_num_rows()
    • mysql_options()
    • mysql_options4()
    • mysql_ping()
    • mysql_plugin_options()
    • mysql_query()
    • mysql_real_connect()
    • mysql_real_escape_string()
    • mysql_real_query()
    • mysql_refresh()
    • mysql_reload()
    • mysql_rollback()
    • mysql_row_seek()
    • mysql_row_tell()
    • mysql_select_db()
    • mysql_server_end()
    • mysql_server_init()
    • mysql_set_character_set()
    • mysql_set_local_infile_default()
    • mysql_set_local_infile_handler()
    • mysql_set_server_option()
    • mysql_shutdown()
    • mysql_sqlstate()
    • mysql_ssl_set()
    • mysql_stat()
    • mysql_stmt_affected_rows()
    • mysql_stmt_attr_get()
    • mysql_stmt_attr_set()
    • mysql_stmt_bind_param()
    • mysql_stmt_bind_result()
    • mysql_stmt_close()
    • mysql_stmt_data_seek()
    • mysql_stmt_errno()
    • mysql_stmt_error()
    • mysql_stmt_execute()
    • mysql_stmt_fetch()
    • mysql_stmt_fetch_column()
    • mysql_stmt_field_count()
    • mysql_stmt_free_result()
    • mysql_stmt_init()
    • mysql_stmt_insert_id()
    • mysql_stmt_next_result()
    • mysql_stmt_num_rows()
    • mysql_stmt_param_count()
    • mysql_stmt_param_metadata()
    • mysql_stmt_prepare()
    • mysql_stmt_reset()
    • mysql_stmt_result_metadata()
    • mysql_stmt_row_seek()
    • mysql_stmt_row_tell()
    • mysql_stmt_send_long_data()
    • mysql_stmt_sqlstate()
    • mysql_stmt_store_result()
    • mysql_store_result()
    • mysql_thread_end()
    • mysql_thread_id()
    • mysql_thread_init()
    • mysql_thread_safe()
    • mysql_use_result()
    • mysql_warning_count()

Download PDF

Overview Installation guide Basic data structures Basic API operations API operations on prepared statements Overview my_init() mysql_affected_rows() mysql_autocommit() mysql_change_user() mysql_character_set_name() mysql_client_find_plugin() mysql_client_register_plugin() mysql_close() mysql_commit() mysql_connect() mysql_create_db() mysql_data_seek() mysql_debug() mysql_drop_db() mysql_dump_debug_info() mysql_eof() mysql_errno() mysql_error() mysql_escape_string() mysql_fetch_field() mysql_fetch_field_direct() mysql_fetch_fields() mysql_fetch_lengths() mysql_fetch_row() mysql_field_count() mysql_field_seek() mysql_field_tell() mysql_free_result() mysql_get_character_set_info() mysql_get_client_info() mysql_get_client_version() mysql_get_host_info() mysql_get_proto_info() mysql_get_server_info() mysql_get_server_version() mysql_get_ssl_cipher() mysql_hex_string() mysql_info() mysql_init() mysql_insert_id() mysql_kill() mysql_library_end() mysql_library_init() mysql_list_dbs() mysql_list_fields() mysql_list_processes() mysql_list_tables() mysql_load_plugin() mysql_load_plugin_v() mysql_more_results() mysql_next_result() mysql_num_fields() mysql_num_rows() mysql_options() mysql_options4() mysql_ping() mysql_plugin_options() mysql_query() mysql_real_connect() mysql_real_escape_string() mysql_real_query() mysql_refresh() mysql_reload() mysql_rollback() mysql_row_seek() mysql_row_tell() mysql_select_db() mysql_server_end() mysql_server_init() mysql_set_character_set() mysql_set_local_infile_default() mysql_set_local_infile_handler() mysql_set_server_option() mysql_shutdown() mysql_sqlstate() mysql_ssl_set() mysql_stat() mysql_stmt_affected_rows() mysql_stmt_attr_get() mysql_stmt_attr_set() mysql_stmt_bind_param() mysql_stmt_bind_result() mysql_stmt_close() mysql_stmt_data_seek() mysql_stmt_errno() mysql_stmt_error() mysql_stmt_execute() mysql_stmt_fetch() mysql_stmt_fetch_column() mysql_stmt_field_count() mysql_stmt_free_result() mysql_stmt_init() mysql_stmt_insert_id() mysql_stmt_next_result()
OceanBase logo

The Unified Distributed Database for the AI Era.

Follow Us
Products
OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
Resources
DocsBlogLive DemosTraining & Certification
Company
About OceanBaseTrust CenterLegalPartnerContact Us
Follow Us

© OceanBase 2026. All rights reserved

Cloud Service AgreementPrivacy PolicySecurity
Contact Us
Document Feedback
  1. Documentation Center
  2. OceanBase Connector/C
  3. V2.0.0
iconOceanBase Connector/C
V 2.0.0
  • V 2.0.0

mysql_load_plugin()

Last Updated:2026-04-10 03:06:40  Updated
share
What is on this page
Syntax
Return values
Errors
Notes

folded

share

You can call the mysql_load_plugin() function to load an OBClient plug-in of the specified name and type.

Syntax

struct st_mysql_client_plugin *
mysql_load_plugin(MYSQL *mysql,
                  const char *name,
                  int type,
                  int argc,
                  ...)

Arguments

  • mysql: a pointer to a MYSQL structure. The plug-in API does not require a connection to the OBServer, but this structure must be properly initialized. The structure is used to obtain connection-related information.

  • name: The name of the plug-in that you want to load.

  • type: The type of the plug-in that you want to load. You can set it to -1 to disable type checking. If type is not -1, only plug-ins that match the type are considered for loading.

  • argc: The number of following arguments. Set it to 0 if no following argument exists.

Return values

A pointer to the plug-in is returned after the plug-in is loaded. NULL is returned if an error occurred.

Errors

Call the mysql_error() or mysql_errno() function to check for errors.

Notes

An error occurs if the type is invalid or the plug-in cannot be loaded. You cannot load multiple plug-ins of the same type. An error occurs if you try to load a plug-in of a type already loaded.

Alternatively, you can load plug-ins by setting the LIBMYSQL_PLUGINS environment variable to a list of plug-in names separated with semicolons (;). Example:

export LIBMYSQL_PLUGINS="myplugin1;myplugin2;myplugin3"

Plug-ins named by LIBMYSQL_PLUGINS are loaded when the client program calls mysql_library_init(). No error is reported if problems occur in loading these plug-ins. The LIBMYSQL_PLUGIN_DIR environment variable can be set to the path name of the directory in which client plug-ins are searched for. This variable is used in two ways:

  • During the preloading of client plug-ins, the value of the --plugin-dir option is not available. Therefore, client plug-in loading fails unless the plug-ins are located in the hardwired default directory. If the plug-ins are located elsewhere, LIBMYSQL_PLUGIN_DIR environment variable can be set to the proper directory to enable plug-in preloading to succeed.
  • For explicit client plug-in loading, the mysql_load_plugin() and mysql_load_plugin_v() functions are used. C API functions use the LIBMYSQL_PLUGIN_DIR value if it exists and the --plugin-dir option is not given. If --plugin-dir is given, mysql_load_plugin() and mysql_load_plugin_v() ignore LIBMYSQL_PLUGIN_DIR.

Previous topic

mysql_list_tables()
Last

Next topic

mysql_load_plugin_v()
Next
What is on this page
Syntax
Return values
Errors
Notes