# About MariaDB Connector/Node.js

{% hint style="info" %}

<p align="center">The most recent release of <a href="">MariaDB Connector/Node.js</a> is:</p>

<p align="center"><a href="https://app.gitbook.com/s/aEnK0ZXmUbJzqQrTjFyb/connectors/node.js/3.x/3.5.2" class="button secondary">Connector/Node.js 3.5.2</a> <a href="https://mariadb.com/downloads/connectors/connectors-data-access/nodejs-connector" class="button primary">Download Now</a></p>
{% endhint %}

<p align="center"><a href="https://app.gitbook.com/s/aEnK0ZXmUbJzqQrTjFyb/connectors/node.js/all-releases">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: [connector](https://mariadb.com/downloads/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: [mariadb](https://www.npmjs.com/package/mariadb)

### Installing the Driver

The driver can be installed using npm:

```bash
npm install mariadb
```

### Choosing a Version

Driver versions are compatible with all MariaDB servers and MySQL 5.x (>= 5.5.3).\
Tested with all active MariaDB server versions with Node.js 14+ (see [CI tests](https://github.com/mariadb-corporation/mariadb-connector-nodejs/actions) on ubuntu/windows/macOS).

### Requirements

MariaDB Connector/Node.js requires Node.js 14 or above, since it is based on Promise.

### 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.

## 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) and [Callback API](https://mariadb.com/docs/connectors/mariadb-connector-nodejs/connector-nodejs-callback-api). The default API is Promise. The callback API is provided for compatibility with the mysql and mysql2 APIs.

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/connectors/mariadb-connector-nodejs/mariadb-connector-node-js-guide.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
