> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/tools/community/mariadb-ai-plugins/skills-reference/connector-skills.md).

# Connector Skills

Reference for the MariaDB AI Plugins skills that cover installing and using the MariaDB connectors.

There are two skills for each MariaDB connector. One covers installation and configuration, and the other covers using the connector in application code.

| Skill                              | Plugins | What it covers                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ---------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `mariadb-connector-python-install` | `dev`   | Installing and configuring MariaDB Connector/Python (the `mariadb` PyPI module) — that a plain `pip install mariadb` gets the 1.1 GA line, which always builds the C extension and so needs MariaDB Connector/C 3.3.1 or later with `mariadb_config` on the `PATH`; that the pure-Python, binary-wheel and pooling variants exist only on the 2.0 line and need `pip install --pre mariadb[...]`; that pooling is built in on 1.1 but a separate `[pool]` extra on 2.0; the Python floor (3.8 on 1.1, 3.10 on 2.0); that option files are read only when `default_file` or `default_group` is passed; and that `ssl_verify_cert` defaults to off on 1.1.                                                                                                                                                                                                                                    |
| `mariadb-connector-python-usage`   | `dev`   | MariaDB-specific behavior of MariaDB Connector/Python (the `mariadb` PyPI module, a PEP-249 / DB API 2.0 driver) for application code — that the default paramstyle is qmark (`?`), not format (`%s`), and styles must not be mixed; that string formatting must never build SQL; that autocommit is off by default so DML needs `conn.commit()`; that a single parameter needs a one-tuple `(v,)`; that the text protocol is default and `binary=True` switches to server-side prepared statements; that cursors are buffered by default; connection pooling via `ConnectionPool` (default size 5, max 64); `callproc()` for stored procedures; and the DB API exception hierarchy under `mariadb.Error`.                                                                                                                                                                                  |
| `mariadb-connector-j-install`      | `dev`   | Installing and configuring MariaDB Connector/J, the JDBC driver for MariaDB — the Maven and Gradle coordinates `org.mariadb.jdbc:mariadb-java-client`, the driver class `org.mariadb.jdbc.Driver`, and the Java version each release series supports; that the 3.x lines accept only the `jdbc:mariadb:` URL scheme unless `permitMysqlScheme` is set; that JNA is not a transitive dependency and must be added by the application before Unix domain sockets or Windows named pipes will work; and the TLS configuration, where `sslMode` defaults to disabled so encryption has to be requested explicitly, then tuned with `serverSslCert`, truststores, and keystores.                                                                                                                                                                                                                 |
| `mariadb-connector-j-usage`        | `dev`   | MariaDB-specific behavior of MariaDB Connector/J (the `org.mariadb.jdbc:mariadb-java-client` JDBC driver) for application code — that JDBC 4 auto-registers the driver so `Class.forName` is unneeded; that the URL scheme is `jdbc:mariadb://host:port/db?opts` (`jdbc:mysql:` needs `permitMysqlScheme`); that `useServerPrepStmts` defaults to false, so `PreparedStatement` substitutes parameters client-side; that batched INSERTs use the `COM_STMT_BULK` protocol by default and `getGeneratedKeys()` then returns all generated ids, one per row, not a single id; that `autocommit` defaults to true so transactions need `setAutoCommit(false)`; that `setFetchSize(Integer.MIN_VALUE)` throws (fetch size must be >= 0); that pooling should use `MariaDbPoolDataSource` or an external pool; and that failover uses multi-host URLs, not driver code.                          |
| `mariadb-connector-nodejs-install` | `dev`   | Installing and configuring MariaDB Connector/Node.js (the `mariadb` npm package) — that it is pure JavaScript with no native build step, so no compiler or `node-gyp` is involved; that the 3.5 line requires Node.js 20 or later; that the default export is the promise API and the callback API lives behind the `mariadb/callback` subpath, with both ESM and CommonJS resolved through the package's exports map and TypeScript typings already bundled; that `ssl: true` verifies the server certificate by default and a private CA needs an object form; and the pool defaults, `connectionLimit` 10 and `acquireTimeout` 10 seconds.                                                                                                                                                                                                                                               |
| `mariadb-connector-nodejs-usage`   | `dev`   | MariaDB-specific behavior of MariaDB Connector/Node.js (the `mariadb` npm package, a non-blocking driver) for application code — that the Promise API is default, with the Callback API under `require('mariadb/callback')`; that `?` positional placeholders are default and `:name` style needs `namedPlaceholders`; that BIGINT and `insertId` return native BigInt unless `bigIntAsNumber`/`insertIdAsNumber` are set; that `batch()` uses the bulk protocol instead of looping `query()`; that `queryStream()` is needed for large results since `query()` buffers everything in memory; that `pool.getConnection()` needs a `release()` in a `finally`; that autocommit follows the server default (ON) so transactions need explicit `beginTransaction()`/`commit()`/`rollback()`; and that `execute()` uses server-side prepared statements while `query()` uses the text protocol. |
| `mariadb-connector-odbc-install`   | `dev`   | Installing and configuring MariaDB Connector/ODBC — that a driver manager (unixODBC on Linux, iODBC on macOS, the built-in manager on Windows) is a prerequisite and the driver has to be registered with it in `odbcinst.ini` before any DSN or `DRIVER=` connection string resolves; that the driver's own bitness must match the driver manager's; where `odbcinst`, `ODBCSYSINI`, `ODBCINI`, and `ODBCINSTINI` put the configuration; that the canonical DSN keywords are `UID` and `PWD` with `USER` and `PASSWORD` as synonyms; and the TLS keywords `SSLCA`, `SSLVERIFY`, `FORCETLS`, and `TLSVERSION`.                                                                                                                                                                                                                                                                              |
| `mariadb-connector-odbc-usage`     | `dev`   | MariaDB-specific behavior of MariaDB Connector/ODBC (the ODBC 3.8-compliant driver built on MariaDB Connector/C) for application code — that the DSN-less keyword is `DRIVER={MariaDB ODBC 3.2 Driver}` on Windows, or a registered driver name / `.so` path on Linux and macOS; that parameter markers are always the positional `?` via `SQLBindParameter`, never named; that one Unicode (`SQLWCHAR`) driver binary serves both ANSI and Unicode apps via `SQL_ATTR_ANSI_APP`; that `SQLPrepare`+`SQLExecute` uses server-side prepared statements (binary protocol) while `SQLExecDirect` defaults to client-side text unless `EDSERVER` is set; that autocommit is ON by default so transactional code must switch `SQL_ATTR_AUTOCOMMIT` off; and that TLS turns on implicitly when any of `SSLCA`/`SSLCERT`/`SSLKEY` is set.                                                          |
| `mariadb-connector-r2dbc-install`  | `dev`   | Installing and configuring MariaDB Connector/R2DBC, the reactive non-blocking driver for MariaDB — the Maven coordinates `org.mariadb:r2dbc-mariadb`, the fact that it implements R2DBC rather than JDBC so connections come from `ConnectionFactories.get()` with an `r2dbc:mariadb://` URL and never from `DriverManager`; that connection pooling is a separate `io.r2dbc:r2dbc-pool` dependency rather than a built-in; that `sslMode` defaults to disabled so TLS must be requested explicitly and then tuned with `serverSslCert` or a truststore; and the parameter names that differ from the JDBC driver, notably `username` and `socket`.                                                                                                                                                                                                                                         |
| `mariadb-connector-r2dbc-usage`    | `dev`   | MariaDB-specific behavior of MariaDB Connector/R2DBC (the `org.mariadb:r2dbc-mariadb` reactive driver implementing the R2DBC SPI) for application code — that the URL scheme is `r2dbc:mariadb://user:pw@host:port/db` and factories come from `ConnectionFactories.get(url)` or a `MariadbConnectionConfiguration` builder; that placeholders are positional `?` bound 0-indexed or named `:name`; that NOTHING runs until the `Publisher` returned by `Statement.execute()` is subscribed, and a `Result` can be consumed exactly once; that `bindNull(index, Class)` needs an explicit type; that autocommit defaults to true and `useServerPrepStmts` to false; that transactions return `Mono<Void>` that must itself be subscribed; that pooling is not built in and needs `r2dbc-pool`; and that errors arrive as `onError` signals (`R2dbcException`), not thrown exceptions.       |
| `mariadb-connector-cpp-install`    | `dev`   | Installing and configuring MariaDB Connector/C++ — that MariaDB Connector/C is a hard prerequisite on Linux and must be installed first (3.1.1 or later for Connector/C++ 1.0, 3.3.3 or later for 1.1), while the Windows MSI brings it along; that Connector/C++ is downloaded per platform rather than pulled from the server package repository; that the binary tarball install is manual and easy to leave half-done, with the authentication plugin directory the piece most often missed; that the library is `-lmariadbcpp` and the public header is `mariadb/conncpp.hpp`; and that the build requires C++11.                                                                                                                                                                                                                                                                      |
| `mariadb-connector-cpp-usage`      | `dev`   | MariaDB-specific behavior of MariaDB Connector/C++ (the `sql::` namespace API, modeled on JDBC 4.0) for application code — that a driver comes from `sql::mariadb::get_driver_instance()` and connections from `driver->connect(url, props)`, returning a raw `Connection*` you must own; that the URL is `jdbc:mariadb://host:port/database[?opt=val]`; that `PreparedStatement` parameter indexes and `ResultSet` column indexes are 1-based, not 0-based; that `?` is the only placeholder; that `ResultSet::next()` must be called before the first read; that the API returns raw pointers with no automatic cleanup — wrap them in `std::unique_ptr` or `close()` explicitly, child before parent; that `sql::SQLString` is the parameter/return type throughout; that autocommit defaults to true; that errors surface as `sql::SQLException`; and that it is built on Connector/C.  |
| `mariadb-connector-c-install`      | `dev`   | Installing and configuring MariaDB Connector/C, the C client library the other MariaDB connectors build on — the runtime and development package names per distribution (`libmariadb3`/`libmariadb-dev`, `MariaDB-shared`/`MariaDB-devel`), how to get compile and link flags from `mariadb_config` or pkg-config `libmariadb` rather than hardcoding them, the build-from-source prerequisites, and the configuration side: that the library reads option files only when the application asks for them via `MYSQL_READ_DEFAULT_FILE` or `MYSQL_READ_DEFAULT_GROUP`, which option groups it reads, how `!includedir` and unknown options differ from the server, and which TLS options depend on the library it was built against.                                                                                                                                                         |
| `mariadb-connector-c-usage`        | `dev`   | MariaDB-specific behavior of MariaDB Connector/C (the `libmariadb` client library implementing the MariaDB client-server protocol in C) for application code — that the public API is still `mysql_`-prefixed (`mysql_init`, `mysql_real_connect`, `mysql_query`, ...) with only a few `mariadb_`-prefixed extensions; that `mysql_init()` must precede `mysql_real_connect()`, with `mysql_optionsv()` options set in between; the buffered-vs-unbuffered split between `mysql_store_result()` and `mysql_use_result()` plus the mandatory `mysql_free_result()`; that literals need `mysql_real_escape_string()` when not using prepared statements; the `?`-placeholder prepared-statement API (`MYSQL_BIND` arrays, `mysql_stmt_bind_param`/`execute`/`fetch`); and that autocommit is ON by default so transactions need `mysql_autocommit(conn,0)`.                                   |

<sub>*This page is licensed: GPLv2*</sub>

{% @marketo/form formId="4316" %}
