All pages
Powered by GitBook
1 of 23

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Connector/Node.js 3.4.5 Release Notes

Download Release Notes Changelog

Release date: 25 Jul 2025

MariaDB Connector/Node.js 3.4.5 is a Stable (GA) release.

For an overview of MariaDB Connector/Node.js see the page

Issues Fixed

  • : Fixed SSL connection error with custom CA certificates causing "TypeError: validationFunction is not a function"

  • : Added missing TypeScript type definitions (@types/geojson, @types/node) to dependencies

CONJS-323
CONJS-324

Connector/Node.js 3.x Release Notes

This category contains release notes for releases in the MariaDB Connector/Node.js 3.x series

Connector/Node.js 3.4.4 Release Notes

Download Release Notes Changelog

Release date: 3 Jul 2025

MariaDB Connector/Node.js 3.4.4 is a Stable (GA) release.

For an overview of MariaDB Connector/Node.js see the page

Issues Fixed

  • : TypeScript types/share.d.ts and types/callback.d.ts are not published

Connector/Node.js 3.3.1 Release Notes

Download | Release Notes | Changelog |

Release date: 5 Jun 2024

MariaDB Connector/Node.js 3.3.1 is a Stable (GA) release.

For an overview of MariaDB Connector/Node.js see the page

Notable Changes

  • A pool timeout error now returns connection timeout details

Issues Fixed

  • Connection can possibly stay in hang state after batch execution

    • When using batch with big values, a connection might be in a wrong state, which can result in Server error: '(Got an error reading communication packets)'

    • Client TCP error ECONRESET

Connector/Node.js 3.5.0-rc Release Notes

Release date: 10 Oct 2025

MariaDB Connector/Node.js 3.5.0-rc is an release.

For an overview of MariaDB Connector/Node.js see the page

Connector/Node.js 3.4.3 Release Notes

An issue was discovered in the Connector/Node.js 3.4.3 release shortly after release and it has been replaced by Connector/Node.js 3.4.4. See the 3.4.4 for more details.

Release date: 2 Jul 2025

MariaDB Connector/Node.js 3.4.3 is a (GA) release.

CONJS-292 Connector does not permit passing a String object (≠ native string) parameter

  • const objVal = new String('myValue');

  • CONJS-286 When using a prepared statement and explicitly disabling prepare cache using prepareCacheLength=0, the connector might not retrieve results anymore

  • CONJS-287 Typescript is missing 'QueryOption' for the 'prepare' command

  • CONJS-293 When using batch, javascript Date values that are not in the range 1970-01-01 00:00:01 - 2038-01-19 03:14:07 are saved as null

  • CONJS-288
    CONJS-289
    CONJS-290
    Notable changes
    • CONJS-326 migrate from commonJS to ESM

    • CONJS-325 deno compatibility

    Issues Fixed

    • CONJS-328 Fix minimumIdle option to maintain baseline idle connections

    • CONJS-330 caching_sha2_password: avoid requiring RSA key pair when connecting via Unix socket

    Download
    Release Notes
    RC

    For an overview of MariaDB Connector/Node.js see the page

    Notable changes

    • CONJS-309: Enhanced TypeScript support by adding mariadb/callback type definitions

    Issues Fixed

    • CONJS-319: Resolved SSL identity verification issue where servername parameter wasn't being properly validated

    • CONJS-320: Fixed cluster filtering problems in query/execute operations when using the callback API

    • CONJS-321: Moved @types/geojson and @types/node packages to development dependencies for cleaner production builds

    release notes
    Download
    Release Notes
    Changelog
    Stable
    CONJS-322

    Connector/Node.js 3.4.2 Release Notes

    Download | Release Notes | Changelog |

    Release date: 25 Apr 2025

    MariaDB Connector/Node.js 3.4.2 is a Stable (GA) release.

    For an overview of MariaDB Connector/Node.js see the page

    Issues Fixed

    • : Repeated named placeholders causes "Placeholder is not defined"

    Connector/Node.js 3.4.0 Release Notes

    | | |

    Release date: 24 Oct 2024

    MariaDB Connector/Node.js 3.4.0 is a (GA) release.

    For an overview of MariaDB Connector/Node.js see the page

    Connector/Node.js 3.4.1 Release Notes

    | | |

    Release date: 2 Apr 2025

    MariaDB Connector/Node.js 3.4.1 is a (GA) release.

    For an overview of MariaDB Connector/Node.js see the page

    Connector/Node.js 3.1.1 Release Notes

    | | |

    Release date: 17 Mar 2023

    MariaDB Connector/Node.js 3.1.1 is a (GA) release.

    For an overview of MariaDB Connector/Node.js see the page

    Connector/Node.js 3.2.1 Release Notes

    | | |

    Release date: 14 Sep 2023

    MariaDB Connector/Node.js 3.2.1 is a (GA) release.

    For an overview of MariaDB Connector/Node.js see the page

    Notable changes
    • CONJS-299 Support of the PARSEC Authentication Plugin which is provided starting with MariaDB Server 11.6. See the for more details

    • CONJS-295 A new option jsonStrings has been added which can be used to return a JSON field as type string instead of type JSON

    When working with JSON fields in MariaDB and MySQL, it's important to note that the handling differs between the two database systems.

    • autoJsonMap Option: The autoJsonMap option provides flexibility in MariaDB. You can choose to have the connector return either JSON objects or string representations of the JSON data.

    • jsonStrings Option: The jsonStrings option introduces a similar choice for MySQL JSON fields. It allows you to specify whether the connector should return JSON objects or string values.

    In essence, the JSON fields will be returned either as a JSON or String will depend on 2 different options depending on the database you’re working with.

    • CONJS-296 Add option enableKeepAlive / keepAliveInitialDelay alias for keepAliveDelay for mysql2 compatibility

    The keepAliveDelay option in MariaDB connectors controls the frequency of keep-alive packets sent to maintain a persistent connection.

    • Disabled: When set to 0, keep-alive functionality is disabled.

    • Enabled: For any non-zero value, keep-alive packets are sent at the specified interval.

    MySQL 2 Compatibility: To ensure compatibility with the MySQL 2 connector, the enableKeepAlive and keepAliveInitialDelay options have been added.

    • enableKeepAlive: If disabled, keepAliveDelay is automatically set to 0, effectively disabling keep-alive.

    • enableKeepAlive: If enabled, keepAliveDelay is set to the value specified in keepAliveInitialDelay.

    In summary, the keepAliveDelay option determines the keep-alive frequency, while the enableKeepAlive and keepAliveInitialDelay options provide compatibility with MySQL 2 connectors by allowing you to control whether keep-alive is enabled and set the initial delay.

    Issues Fixed

    CONJS-303 DMLs are not returning an output while streaming

    Download
    Release Notes
    Changelog
    Stable

    The most recent release of is:

    Issues Fixed
    • CONJS-306: Support "zero configuration ssl" for parsec authentication

    • CONJS-315: Fixed issue with incorrect data for result-set rows of exactly 16M of data

    • CONJS-312: Improved pool error messages when failing to create connections

    • CONJS-313: Now allows using question mark parameters even when using namedPlaceholders option (mysql compatibility)

    • : Added Connection close alias for end function in TypeScript definition

    • : Fixed Bulk operations potentially returning unexpected error "Cannot read properties of undefined (reading '0')"

    • : Added capability to return all Bulk insert IDs for MariaDB server 11.5.1+

    • : Fixed bulk operations ending with "Got a packet bigger than 'max_allowed_packet' bytes" error

    • : Enhanced handling of non-bulk batched operations to avoid out-of-memory errors for batches not using bulk

    Download
    Release Notes
    Changelog
    Stable

    The most recent release of is:

    Issues Fixed
    • CONJS-246 pool not listening to 'error' event might exit application on error

    • CONJS-240 Repeating calling the same procedure gets a release prepare error.

    • CONJS-244 correction for node.js 12 compatibility

    • CONJS-245 batch failing when using bulk and metaAsArray

    Download
    Release Notes
    Changelog
    Stable

    The most recent release of is:

    Notable changes
    • CONJS-262 Binary result-set parsing performance improvement, avoiding to chromium slow issue detail?id=7161

    • CONJS-265 permit configuration of console warning message to be exported

    • CONJS-266 Option infileStreamFactory addition for compatibility

    Issues Fixed

    • CONJS-261 TypeScript missing logParam connection option

    • CONJS-263 ensure respecting server collation

    Download
    Release Notes
    Changelog
    Stable

    The most recent release of is:

    CONJS-318

    The most recent release of is:

    Connector/Node.js 3.1.0 Release Notes

    The most recent release of is:

    Download | Release Notes | Changelog |

    Release date: 15 Feb 2023

    MariaDB Connector/Node.js 3.1.0 is a Stable (GA) release.

    For an overview of MariaDB Connector/Node.js see the page

    Notable Changes

    Timezone handling

    Connector now set session timezone, solving issue with , removing needs of client side conversion.

    This requires that when using timezone options, to have corresponding server TZ data filled.

    Performance

    • better metadata parsing performance

    • performance improvement when parsing lots of parameter

    • faster execution for known length packet

    see for updated result compared to other connectors

    Other changes

    • Make result set's meta property non-enumerable

    • Allow to pass TypeScript generic types without need of "as"

    Issues Fixed

    • When executing batch with a parameter can be too long to fit in one mysql packet, parameter can have 4 byte missing

    • datatype TIME wrong binary decoding when not having microseconds

    • When using connection with callback, pre-commands (like initSql) might not always be executed first

    Connector/Node.js 3.2.3 Release Notes

    The most recent release of is:

    Download | Release Notes | Changelog |

    Release date: 19 Dec 2023

    MariaDB Connector/Node.js 3.2.3 is a Stable (GA) release.

    For an overview of MariaDB Connector/Node.js see the page

    Notable changes

    • Add support for connection redirection, an upcoming MariaDB Server and MaxScale feature

    Issues Fixed

    • Wrong binary decoding of 00:00:00 TIME values

    • Error doesn't always have parameters according to option

    • Bulk insert error when last bunch of parameters is reaching max_allowed_packet

    • Disabling BULK insert for one batch is not possible

    Connector/Node.js 3.3.2 Release Notes

    The most recent release of is:

    Download | Release Notes | Changelog |

    Release date: 18 Sep 2024

    MariaDB Connector/Node.js 3.3.2 is a Stable (GA) release.

    For an overview of MariaDB Connector/Node.js see the page

    Issues Fixed

    • delay TLS identity validation until certificate normal or fingerprint validation

    • TypeScript type definition file for SqlError constructor does not match actual constructor

    • Typescript connection option timeout in place of queryTimeout

    • Typescript wrong named longlong in place of bigint

    Connector/Node.js 3.0.1 Release Notes

    | | |

    Release date: 26 Jul 2022

    MariaDB Connector/Node.js 3.0.1 is a (GA) release.

    For an overview of MariaDB Connector/Node.js see the page

    Connector/Node.js 3.3.0 Release Notes

    | | |

    Release date: 21 Mar 2024

    MariaDB Connector/Node.js 3.3.0 is a (GA) release.

    For an overview of MariaDB Connector/Node.js see the page

    Connector/Node.js 3.0.0 GA Release Notes

    Release date: 1 Mar 2022

    MariaDB Connector/Node.js 3.0.0 is a (GA) release.

    For an overview of MariaDB Connector/Node.js see the page

    see for 3.0.0 content from previous version.

    Connector/Node.js 3.1.2 Release Notes

    | | |

    Release date: 3 May 2023

    MariaDB Connector/Node.js 3.1.2 is a (GA) release.

    For an overview of MariaDB Connector/Node.js see the page

    The most recent release of is:

    The most recent release of is:

    The most recent release of is:

    The most recent release of is:

    in case of a long query running, connection.destroy() will close connection, but might leave server still running query for some time
  • CONJS-240 adding a Prepare result wrapper to avoid multiple close issue with cache

  • CONJS-241 metaAsArray missing option in typescript description

  • CONJS-237
    CONJS-230
    CONJS-229
    CONJS-238
    here
    CONJS-225
    CONJS-235
    CONJS-231
    CONJS-236
    CONJS-239
    Connector/Node.js 3.4.5
    Download Now
    CONJS-232
    Notable Changes

    Error description improvement

    • Pool might return a common error ‘retrieve connection from pool timeout after XXXms’ in place of real error.[CONJS-200]

    • Trace option now works when using pool/cluster. It is recommended to activate the trace option in development Since driver is asynchronous, enabling this option to save initial stack when calling any driver methods. This allows having the caller method and line in the error stack, permitting error easy debugging. The problem is this error stack is created using Error.captureStackTrace that is very slow. To give an idea, this slows down by 10% a query like 'select * from mysql.user LIMIT 1', so not recommended in production. [CONJS-209]

    • Pool error description is improved indicating pool information, like [CONJS-208]:

    Other improvement

    • node.js 18 supported [CONJS-197]

    • New option checkNumberRange. When used in conjunction of decimalAsNumber, insertIdAsNumber or bigIntAsNumber, if conversion to number is not exact, connector will throw an error. This permits easier compatibility with mysql/mysql2 and 2.x version driver version. [CONJS-198]

    • Performance enhancement for multi-rows resultset. Internal benchmarks show improved performance by 10% for a result-set of 1000 rows.[]

    Issues Fixed

    • [CONJS-193] Wrong error returned "Cannot read properties of undefined… … (reading 'charset')" when error during handshake

    • [CONJS-194] Charset change using parameterized query fails with "Uncaught TypeError: opts.emit is not a function"

    • [CONJS-195] Error "cannot mix BigInt and other types" when parsing negative bigint

    • [CONJS-196] connection.close() is now really an alias or connection.release()

    • [] wrong return type for batch() on typescript

    • [] typecast geometry parsing error

    • [] support pre 4.1 error format for 'too many connection' error

    • [] encoding error for connection attributes when using changeUser with connection attributes

    • [] possible race condition on connection destroy when no other connection can be created

    • [] handle password array when using authentication plugin “pam_use_cleartext_plugin”

    • [] query hanging when using batch with option timeout in place of error thrown

    Changelog

    For a complete list of changes made in this release, with links to detailed information on each push, see the changelog.

    Download
    Release Notes
    Changelog
    Stable

    The most recent release of is:

    Connector/Node.js 3.4.5 Download Now

    Notable changes

    CONJS-264 Zero-Configuration SSL

    In order to have SSL connections, there was 3 solutions:

    • Have server certificates generated with trusted node.js Certificate Authorities (CA), configuration was then like ssl: true.

    • Configure connector with server certificate like:ssl: { ca: [ fs.readFileSync('server-cert.pem') ] }

    • disable certificate ssl verification (not secured!) like:ssl: { rejectUnauthorized: true }

    Since MariaDB 11.4.1 (MDEV-31855), enabling SSL is super easy, with simple configuration like:ssl: true, even if server has not configure ssl certificates. The connector doesn't need to know server certificate anymore, if password is not empty. This is part of mission impossible zero configuration, client validating ssl certificates using client password.

    CONJS-284 pipeline PREPARE and EXECUTE

    Previous use of connection.execute was executing PREPARE command first, read PREPARE response, then execute EXECUTE command and finally read EXECUTE response.

    New implementation, when using MariaDB server 10.2+ and with pipelining option enable (default value) will execute PREPARE, execute EXECUTE, then only read PREPARE response and read EXECUTE response. This permit to avoid much of the network latency.

    Benchmarking results using local database: (distant database would have even better result)

    bench

    This improvement is for first execution of a specific query, since PREPARE is cached by default, second execution would only execute EXECUTE command

    Other changes

    • CONJS-279 Improve query encoding and decoding performance

    Issues Fixed

    • CONJS-281 cannot connect to 11.3+ server with character-set-collations = utf8mb4=uca1400_ai_ci

    • CONJS-277 using connection.importFile when connection is not connected to database result in error

    • CONJS-278 Possible buffer overwrite when sending query bigger than 16M

    • CONJS-282 error when using mysql_clear_test password authentication plugin

    • wrong decoding of binary unsigned MEDIUMINT

    • DECIMAL field wrong decoding with deprecated option 'supportBigNumbers' set

    Download
    Release Notes
    Changelog
    Stable

    The most recent release of is:

    Connector/Node.js 3.4.5 Download Now

    Notable Changes
    • merged correction from 2.5.6

    • [CONJS-185] considering BIT(1) as boolean (option bitOneIsBoolean permit to disable that behavior for compatibility)

    • pool ensuring multi-request process order

    • set parser function once per result-set for better performance

    Changelog

    For a complete list of changes made in this release, with links to detailed information on each push, see the changelog.

    Stable
    3.0.0-rc

    The most recent release of is:

    Connector/Node.js 3.4.5 Download Now

    Notable changes
    • CONJS-249 add connection.listeners function to permit TypeORM compatibility

    Issues Fixed

    • CONJS-247 Improve error message when having set named parameter option and executing standard question mark command

    • CONJS-248 Ensuring not using importing file after pool.end() to permit Jest use

    Download
    Release Notes
    Changelog
    Stable

    The most recent release of is:

    Connector/Node.js 3.4.5 Download Now

    CONJS-305
    CONJS-314
    CONJS-275
    CONJS-304
    CONJS-316
    Connector/Node.js 3.4.5
    Download Now
    CONJS-207
    CONJS-271
    CONJS-272
    CONJS-273
    CONJS-274
    Connector/Node.js 3.4.5
    Download Now
    CONJS-301
    CONJS-302
    CONJS-297
    CONJS-298
    Connector/Node.js 3.4.5
    Download Now
    Connector/Node.js 3.4.5
    Download Now
    Connector/Node.js 3.4.5
    Download Now
    Connector/Node.js 3.4.5
    Download Now
    Connector/Node.js 3.4.5
    Download Now
    Connector/Node.js 3.4.5
    Download Now
    Connector/Node.js 3.4.5
    Download Now
    Connector/Node.js 3.4.5
    Download Now
    Connector/Node.js 3.4.5
    Download Now

    Connector/Node.js 3.0.0-beta Release Notes

    The most recent release of is:

    Download | Release Notes | Changelog |

    Release date: 30 Jun 2021

    MariaDB Connector/Node.js 3.0.0 is a Beta release.

    Do not use beta releases in production!

    For an overview of MariaDB Connector/Node.js see the page

    Notable Changes

    Prepared statement implementation

    Driver now permits using prepared statement. This methods are compatible with mysql2 with some differences:

    • permit streaming parameters

    • execute use by default a prepared cache that hasn't infinite length (option ‘prepareCacheLength’ with default to 256)

    • Implement new feature, skipping metadata when possible for better performance

    New Connection methods:

    • : Prepares a query.

    • : Prepare and Executes a query.

    Example:

    Or directly :

    If reusing query multiple time, this permits to perform better, specifically using . Performance comparison with mysql2 driver show up to 20% performance gain. More info will follow before GA release.

    Exact Number implementation

    Default behaviour for decoding / datatype for 2.x version and mysql/mysql2 drivers return a javascript object. BIGINT / DECIMAL values might not be in the safe range, resulting in approximate results.

    Since 3.x version, driver has reliable default, returning:

    • DECIMAL => javascript String

    • BIGINT => javascript object

    For compatibility with the previous versions or mysql/mysql driver, 3 options have been added to return BIGINT/DECIMAL as Number, like previous defaults.

    Option
    Description
    Type
    default

    Previous options supportBigNumbers and bigNumberStrings still exist for compatibility, but are now deprecated.

    Custom logging API

    Driver permit mapping the logs to an external logger. There is 3 caller functions:

    • network(string): called for each network exchange.

    • query(string): called for each commands

    • error(Error): called for each error.

    if setting one function, function will be used for all loggers. (ie. logger: console.log === logger: { network: console.log, query: console.log, error: console.log})

    Example:

    Changelog

    For a complete list of changes made in this release, with links to detailed information on each push, see the .

    Connector/Node.js 3.0.2 Release Notes

    The most recent release of is:

    Download | Release Notes | Changelog |

    Release date: 27 Oct 2022

    MariaDB Connector/Node.js 3.0.2 is a Stable (GA) release.

    For an overview of MariaDB Connector/Node.js see the page

    Notable Changes

    permit streaming prepare statement result

    Like queryStream, execute command can now be streamed as well for huge resultset, to avoid charging the whole resultset in memory. Example :

    Issues Fixed

    • Metadata column name gets sporadic corrupted

    • Session timezone unset on connection re-use with connection pool

    • when throwing an error when using option leakDetectionTimeout, might result in throwing wrong error with Cannot read properties of null (reading 'leaked')

    Connector/Node.js 3.0.0-rc Release Notes

    | | |

    Release date: 20 Oct 2021

    MariaDB Connector/Node.js 3.0.0-rc is an release.

    Do not use non-stable (non-GA) releases in production!

    For an overview of MariaDB Connector/Node.js see the page

    see for 3.0.0 content from previous version.

    const pool = mariadb.createPool({
          host: 'mydb.com',
          user: 'myUser',
          connectionLimit: 5,
          trace: true
          });
          await pool.query('wrong query');
          /* will throw an error like :
            SqlError: (conn=15868, no: 1064, SQLState: 42000) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'wrong query' at line 1
              sql: wrong query - parameters:[]
                at Object.module.exports.createError (errors.js:57:10)
                at ...
              From event:
                at Function._PARAM (\integration\test-pool.js:60:18)
                at …
              text: "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'wrong query' at line 1",
              sql: 'wrong query - parameters:[]',
              fatal: false,
              errno: 1064,
              sqlState: '42000',
              code: 'ER_PARSE_ERROR'
          */
    SqlError: (conn=-1, no: 45028, SQLState: HY000) retrieve connection from pool timeout after 200ms
          (pool connections: active=1 idle=0 limit=1)
          at Object.module.exports.createError
          …
    CONJS-217 caching_sha2_password never succeed using FAST AUTHENTICATION. With correction, one less exchanges is done when connecting to a MySQL server
  • CONJS-219 prepare cache was not limited to prepareCacheLength but can increase up to 2x the prepareCacheLength value, leading to possible ER_MAX_PREPARED_STMT_COUNT_REACHED

  • CONJS-228 improving prepare cache performance

  • CONJS-226 missing typescript metaAsArray option and documentation

  • CONJS-213 update error code with recent MariaDB server

  • CONJS-215 Executing after prepare close throw an undescriptive error

  • CONJS-221 option debugLen and logParam are not documented

  • CONJS-227 Allow setting idleTimeout to 0

  • CONJS-214 missing pool.closed typescript definition

  • CONJS-216 remove please-upgrade-node dependency

  • CONJS-224 missing typescript checkNumberRange option definition

  • CONJS-223
    CONJS-211
    CONJS-212
    Connector/Node.js 3.4.5
    Download Now
    Notable Changes

    Streaming resultset now respect backpressure

    Before 3.0, implementation ensure connection state, at the cost of not handling backpressure well.

    Streaming a resultset ensured the connection state before version 3.0, at the cost of not handling backpressure well. Since the goal of queryStream is to avoid the use of a large amount of memory, handling of backpressure has been optimized. If data handling takes some amount of time, the socket is paused to avoid the node socket buffer growing indefinitely. This has an impact on the use of function stream.pipeline as queryStream now needs to be closed explicitly to ensure that a connection is not in a wrong state ( unhandled rows in the socket buffer). Example

    Better options default setting

    pool cluster option removeNodeErrorCount now default to infinity. This avoids having pool removed from cluster when a server temporarily fails.

    pool option resetAfterUse now default to false. This permit avoids executing a command each time a connection is returned to pool.

    Optimized defaults

    [CONJS-176],[CONJS-179]

    • The pool cluster option removeNodeErrorCount now defaults to infinity. This avoids that some pool is removed from the cluster when a server temporarily fails.

    • The pool option resetAfterUse now defaults to false. This avoids the execution of a COM_RESET each time a connection is returned to the pool.

    New 'stream' option

    Option
    Description
    Type
    default

    stream

    permits to set a function with parameter to set stream (since 3.0)

    function

    The option stream provides a way to execute a function with a callback parameter before each connection stream creation.

    This can permit setting a SSH Tunnel for example:

    Various corrections

    • [CONJS-125] Batch operations now support the returning clause (example command like insert into XXX values (?,?,?) returning id)

    • [CONJS-125] permit using batch with returning clause

    • [CONJS-170] Pool.query(undefined) never release connection

    • [CONJS-173] not permitting providing null as a value without an array

    • [] Update code to recent Ecma version

    • [] performance improvement for multi-line result-set

    Changelog

    For a complete list of changes made in this release, with links to detailed information on each push, see the changelog.

    Download
    Release Notes
    Changelog
    RC
    3.0.0-beta

    The most recent release of is:

    Connector/Node.js 3.4.5 Download Now

    insertIdAsNumber

    Whether the query should return last insert id from INSERT/UPDATE command as BigInt or Number. default return BigInt

    boolean

    false

    decimalAsNumber

    Whether the query should return decimal as Number. If enabled, this might return approximate values.

    boolean

    false

    bigIntAsNumber

    Whether the query should return BigInt data type as Number. If enabled, this might return approximate values.

    boolean

    mariadb 10.6
    connection.prepare(sql) → Promise
    connection.execute(sql[, values]) → Promise
    mariadb 10.6
    Number
    changelog
    Connector/Node.js 3.4.5
    Download Now

    false

    CONJS-210
    CONJS-199
    CONJS-201
    CONJS-202
    CONJS-203
    CONJS-206
    CONJS-204
    CONJS-205
    CONJS-283
    CONJS-285
    const prepare = await shareConn.prepare('SELECT * FROM mysql.user where host = ?');
    const stream = prepare.executeStream(['localhost']);    
    try {
      for await (const row of stream) {
        console.log(row);
      }
    } catch (e) {
      queryStream.close();
    }
    prepare.close();
    const queryStream = connection.queryStream("SELECT * FROM mysql.user");
    stream.pipeline(queryStream, transformStream, someWriterStream, (err) => { queryStream.close(); });
    const mariadb = require('mariadb');
    const tunnel = require('tunnel-ssh');
    const fs = require('fs');
    
    const conn = await mariadb.createConnection({
            user: 'dbuser',
            password: 'dbpwd',
            port: 27000,
            stream: (cb) => 
              tunnel(
                {
                  // remote connection ssh info
                  username: 'sshuser',
                  host: '157.230.123.7',
                  port: 22,
                  privateKey: fs.readFileSync('./key.ppk'),
                  // database (here on ssh server)
                  dstHost: '127.0.0.1',
                  dstPort: 3306,
                  // local interface
                  localHost: '127.0.0.1',
                  localPort: 27000
                },
                cb
              )
          });
    const prepare = await conn.prepare('INSERT INTO mytable(id,val) VALUES (?,?)');
    await prepare.execute([1, 'val1']);
    prepare.close();
    await conn.execute('INSERT INTO mytable(id,val) VALUES (?,?)', [1, 'val1']);
    const mariadb = require('mariadb');
    const winston = require('winston');
    
    const logger = winston.createLogger({
      level: 'info',
      transports: [
        // - Write all logs with level `error` and below to `error.log`
        // - Write all logs with level `info` and below to `combined.log`
        new winston.transports.Console({ filename: 'error.log', level: 'error' }),
        new winston.transports.Console({ filename: 'combined.log' })
      ]
    });
    
    const pool = mariadb.createPool({
      host: 'mydb.com',
      user:'myUser',
      password: 'myPwd',
      logger: {
        network: (msg) => logger.silly(msg),
        query: (msg) => logger.info(msg),
        error: (err) => logger.error(err),
      }
    });
    CONJS-178
    CONJS-172
    Connector/Node.js Overview
    About MariaDB Connector/Node.js
    MariaDB Connector/Node.js
    Connector/Node.js Overview
    About MariaDB Connector/Node.js
    MariaDB Connector/Node.js
    Connector/Node.js Overview
    About MariaDB Connector/Node.js
    MariaDB Connector/Node.js
    Connector/Node.js Overview
    About MariaDB Connector/Node.js
    Connector/Node.js Overview
    About MariaDB Connector/Node.js
    MariaDB Connector/Node.js
    Connector/Node.js Overview
    About MariaDB Connector/Node.js
    MariaDB Connector/Node.js
    Connector/Node.js Overview
    About MariaDB Connector/Node.js
    MariaDB Connector/Node.js
    Connector/Node.js Overview
    About MariaDB Connector/Node.js
    MariaDB Connector/Node.js
    Connector/Node.js Overview
    About MariaDB Connector/Node.js
    MariaDB Connector/Node.js
    Connector/Node.js Overview
    About MariaDB Connector/Node.js
    MariaDB Connector/Node.js
    Connector/Node.js Overview
    About MariaDB Connector/Node.js
    MariaDB Connector/Node.js
    Connector/Node.js Overview
    About MariaDB Connector/Node.js
    MariaDB Connector/Node.js
    Connector/Node.js Overview
    About MariaDB Connector/Node.js
    MariaDB Connector/Node.js
    Connector/Node.js Overview
    About MariaDB Connector/Node.js
    MariaDB Connector/Node.js
    Connector/Node.js Overview
    About MariaDB Connector/Node.js
    MariaDB Connector/Node.js
    About MariaDB Connector/Node.js
    MariaDB Connector/Node.js
    Connector/Node.js Overview
    About MariaDB Connector/Node.js
    MariaDB Connector/Node.js
    Connector/Node.js Overview
    About MariaDB Connector/Node.js
    MariaDB Connector/Node.js
    Connector/Node.js Overview
    About MariaDB Connector/Node.js
    MariaDB Connector/Node.js
    Connector/Node.js Overview
    About MariaDB Connector/Node.js
    MariaDB Connector/Node.js
    PARSEC Authentication Plugin documentation
    time function
    BIGINT
    DECIMAL
    BigInt

    Connector/Node.js 3.2.2 Release Notes

    The most recent release of is:

    Download | Release Notes | Changelog | Connector/Node.js Overview

    Release date: 16 Oct 2023

    MariaDB Connector/Node.js 3.2.2 is a Stable (GA) release.

    For an overview of MariaDB Connector/Node.js see the About MariaDB Connector/Node.js page

    Issues Fixed

    • Always send connection attributes, even when option connectAttributes is not set

    • avoid useless "set names utf8mb4" on connection creation if not needed

    • importFile method doesn't always throw error when imported commands fails #253

    • Ensure that option collation with id > 255 are respected

    Connector/Node.js 3.2.0 Release Notes

    | | |

    Release date: 19 Jun 2023

    MariaDB Connector/Node.js 3.2.0 is a (GA) release.

    For an overview of MariaDB Connector/Node.js see the page

    Notable changes
    • CONJS-250 'undefined' parameters are now permitted, for compatibility with mysql/mysql2 behavior

    • CONJS-257 permit to import sql file directly

    • CONJS-253 Node.js 20 is now tested and supported

    API addition

    • importFile(options) → Promise

    • connection.importFile({file:'...', 'database': '...'}) → Promise

    • pool.importFile({file:'...', 'database': '...'}) → Promisepromise)

    example:

    Issues Fixed

    • CONJS-252 missing deprecated option supportBigNumbers and bigNumberStrings in Typescript

    • CONJS-254 ensuring option connectTimeout is respected : timeout is removed when socket is successfully established, in place of returning connection object. Wasn't set when using pipe/unix socket

    • CONJS-255 In some case, pipelining was use even option explicitly disable it

    • CONJS-256 method changeUser can lead to error when using multi-authentication and pipelining

    • All eventEmitters methods are not available on connections

    • SqlError sqlMessage property alias for text addition

    Download
    Release Notes
    Changelog
    Stable

    The most recent release of MariaDB Connector/Node.js is:

    Connector/Node.js 3.4.5 Download Now

    Connector/Node.js Overview
    About MariaDB Connector/Node.js
    CONJS-270
    CONJS-269
    CONJS-268
    CONJS-267
    Connector/Node.js 3.4.5
    Download Now
    MariaDB Connector/Node.js
    await conn.importFile({
            file: '/tmp/someFile.sql', 
            database: 'myDb'
        });
    CONJS-258
    CONJS-259

    This page is: Copyright © 2025 MariaDB. All rights reserved.

    This page is: Copyright © 2025 MariaDB. All rights reserved.

    This page is: Copyright © 2025 MariaDB. All rights reserved.

    This page is: Copyright © 2025 MariaDB. All rights reserved.

    This page is: Copyright © 2025 MariaDB. All rights reserved.

    This page is: Copyright © 2025 MariaDB. All rights reserved.

    This page is: Copyright © 2025 MariaDB. All rights reserved.

    This page is: Copyright © 2025 MariaDB. All rights reserved.

    This page is: Copyright © 2025 MariaDB. All rights reserved.

    This page is: Copyright © 2025 MariaDB. All rights reserved.

    This page is: Copyright © 2025 MariaDB. All rights reserved.

    This page is: Copyright © 2025 MariaDB. All rights reserved.

    This page is: Copyright © 2025 MariaDB. All rights reserved.

    This page is: Copyright © 2025 MariaDB. All rights reserved.

    This page is: Copyright © 2025 MariaDB. All rights reserved.

    This page is: Copyright © 2025 MariaDB. All rights reserved.

    This page is: Copyright © 2025 MariaDB. All rights reserved.

    This page is: Copyright © 2025 MariaDB. All rights reserved.

    This page is: Copyright © 2025 MariaDB. All rights reserved.

    This page is: Copyright © 2025 MariaDB. All rights reserved.

    This page is: Copyright © 2025 MariaDB. All rights reserved.

    This page is: Copyright © 2025 MariaDB. All rights reserved.