> 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/connectors/mariadb-connector-nodejs/mariadb-connector-node-js-guide.md).

# About MariaDB Connector/Node.js

MariaDB Connector/Node.js is a native JavaScript driver for connecting Node.js applications to MariaDB and MySQL databases, supporting both Promise and Callback APIs via npm.

{% hint style="info" %}

<p align="center">The most recent release of <a href="https://mariadb.com/docs/connectors/mariadb-connector-nodejs.md">MariaDB Connector/Node.js</a> is: <a href="https://mariadb.com/docs/release-notes/connectors/node.js/3.x/3.5.5.md"><strong>3.5.5</strong></a></p>

<p align="center"><a href="https://mariadb.com/downloads/connectors/connectors-data-access/nodejs-connector" class="button primary">Download Connector/Node.js 3.5.5</a></p>
{% endhint %}

<p align="center"><a href="https://mariadb.com/docs/release-notes/connectors/node.js/all-releases.md">See all MariaDB Connector/Node.js releases</a></p>

<p align="center"><a href="https://mariadb.com/downloads/connectors/connectors-data-access/nodejs-connector" class="button primary">Download MariaDB Connector/Node.js</a></p>

MariaDB Connector/Node.js is used to connect applications developed on Node.js to\
MariaDB and MySQL databases. The library is LGPL licensed.

## About MariaDB Connector/Node.js

MariaDB Connector/Node.js is a native JavaScript driver.

### Obtaining the Driver

The required files can be downloaded from: [MariaDB Connector/Node.js downloads](https://mariadb.com/downloads/connectors/connectors-data-access/nodejs-connector/)

The source code is available on GitHub: [mariadb-connector-nodejs](https://github.com/MariaDB/mariadb-connector-nodejs)

MariaDB Connector/Node.js on npm, the package manager for JavaScript: [npm mariadb](https://www.npmjs.com/package/mariadb)

### Installing the Driver

The driver can be installed using npm:

```bash
npm install mariadb
```

### License

GNU Lesser General Public License as published by the Free Software Foundation;\
either version 2.1 of the License or (at your option) any later version.

## Supported Versions

### Server Compatibility

Driver versions are compatible with all MariaDB servers and MySQL 5.x (>= 5.5.3). Individual server-side features may require a minimum server version; those requirements are noted with the feature.

The driver is tested with all active MariaDB server versions on Node.js 20 and later (see [CI tests](https://github.com/mariadb-corporation/mariadb-connector-nodejs/actions) on ubuntu/windows/macOS).

### Supported Release Series

The following MariaDB Connector/Node.js release series are supported:

| Release Series | Stable (GA) Date |
| -------------- | ---------------- |
| 3.5            | February 2026    |
| 3.4            | October 2024     |
| 3.3            | March 2024       |
| 3.2            | June 2023        |

For End of Standard Support and End of Life dates, see the [MariaDB Engineering Policy](https://mariadb.com/engineering-policies/).

### Requirements

The minimum Node.js version depends on the release series:

| Release Series | Minimum Node.js                         |
| -------------- | --------------------------------------- |
| 3.5            | 20 (3.5.3 and later); 18 (before 3.5.3) |
| 3.4            | 14                                      |
| 3.3            | 14                                      |
| 3.2            | 12                                      |

The connector checks the Node.js version at startup and exits with an error if it is older than the minimum.

### Checking Your Installed Version

The connector exports its version as a string:

```javascript
import { version } from 'mariadb';

console.log(version); // for example, '3.5.5'
```

With CommonJS, use `const { version } = require('mariadb');`. To see the installed version without running code, use `npm list mariadb`.

## Using the Driver

The MariaDB Connector can use different APIs on the back-end: [Promise](https://mariadb.com/docs/connectors/mariadb-connector-nodejs/connector-nodejs-promise-api.md) and [Callback API](https://mariadb.com/docs/connectors/mariadb-connector-nodejs/connector-nodejs-callback-api.md). The default API is Promise. The callback API is provided for compatibility with the mysql and mysql2 APIs.

<sub>*This page is: Copyright © 2026 MariaDB. All rights reserved.*</sub>

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