The hostname of the database you are connecting to. (Default: localhost)
The port number to connect to. (Default: 3306)
The source IP address to use for TCP connection. (Optional)
The path to a unix domain socket to connect to. When used host and port are ignored.
The MySQL user to authenticate as.
The password of that MySQL user.
Name of the database to use for this connection (Optional).
The charset for the connection. This is called "collation" in the SQL-level of MySQL (like utf8_general_ci). If a SQL-level charset is specified (like utf8mb4) then the default collation for that charset is used. (Default: 'UTF8_GENERAL_CI')
The timezone used to store local dates. (Default: 'local')
The milliseconds before a timeout occurs during the initial connection to the MySQL server. (Default: 10000)
Stringify objects instead of converting to values. See issue #501. (Default: 'false')
Allow connecting to MySQL instances that ask for the old (insecure) authentication method. (Default: false)
Determines if column values should be converted to native JavaScript types. (Default: true)
A custom query format function. See Custom format.
When dealing with big numbers (BIGINT and DECIMAL columns) in the database, you should enable this option (Default: false).
Enabling both supportBigNumbers and bigNumberStrings forces big numbers (BIGINT and DECIMAL columns) to be always returned as JavaScript String objects (Default: false). Enabling supportBigNumbers but leaving bigNumberStrings disabled will return big numbers as String objects only when they cannot be accurately represented with [JavaScript Number objects] (http://ecma262-5.com/ELS5_HTML.htm#Section_8.5) (which happens when they exceed the [-253, +253] range), otherwise they will be returned as Number objects. This option is ignored if supportBigNumbers is disabled.
Force date types (TIMESTAMP, DATETIME, DATE) to be returned as strings rather then inflated into JavaScript Date objects. (Default: false)
Prints protocol details to stdout. (Default: false)
Generates stack traces on Error to include call site of library entrance ("long stack traces"). Slight performance penalty for most calls. (Default: true)
Allow multiple mysql statements per query. Be careful with this, it could increase the scope of SQL injection attacks. (Default: false)
List of connection flags to use other than the default ones. It is also possible to blacklist default ones. For more information, check Connection Flags.
object with ssl parameters or a string containing name of ssl profile. See SSL options.
Enabling both supportBigNumbers and bigNumberStrings forces big numbers (BIGINT and DECIMAL columns) to be always returned as JavaScript String objects (Default: false).
Enabling both supportBigNumbers and bigNumberStrings forces big numbers (BIGINT and DECIMAL columns) to be always returned as JavaScript String objects (Default: false). Enabling supportBigNumbers but leaving bigNumberStrings disabled will return big numbers as String objects only when they cannot be accurately represented with [JavaScript Number objects] (http://ecma262-5.com/ELS5_HTML.htm#Section_8.5) (which happens when they exceed the [-253, +253] range), otherwise they will be returned as Number objects. This option is ignored if supportBigNumbers is disabled.
The charset for the connection.
The charset for the connection. This is called "collation" in the SQL-level of MySQL (like utf8_general_ci). If a SQL-level charset is specified (like utf8mb4) then the default collation for that charset is used. (Default: 'UTF8_GENERAL_CI')
The milliseconds before a timeout occurs during the initial connection to the MySQL server.
The milliseconds before a timeout occurs during the initial connection to the MySQL server. (Default: 10000)
Name of the database to use for this connection (Optional).
Force date types (TIMESTAMP, DATETIME, DATE) to be returned as strings rather then inflated into JavaScript Date objects.
Force date types (TIMESTAMP, DATETIME, DATE) to be returned as strings rather then inflated into JavaScript Date objects. (Default: false)
Prints protocol details to stdout.
Prints protocol details to stdout. (Default: false)
List of connection flags to use other than the default ones.
List of connection flags to use other than the default ones. It is also possible to blacklist default ones. For more information, check Connection Flags.
The hostname of the database you are connecting to.
The hostname of the database you are connecting to. (Default: localhost)
Allow connecting to MySQL instances that ask for the old (insecure) authentication method.
Allow connecting to MySQL instances that ask for the old (insecure) authentication method. (Default: false)
The source IP address to use for TCP connection.
The source IP address to use for TCP connection. (Optional)
Allow multiple mysql statements per query.
Allow multiple mysql statements per query. Be careful with this, it could increase the scope of SQL injection attacks. (Default: false)
The password of that MySQL user.
The port number to connect to.
The port number to connect to. (Default: 3306)
A custom query format function.
A custom query format function. See Custom format.
The path to a unix domain socket to connect to.
The path to a unix domain socket to connect to. When used host and port are ignored.
object with ssl parameters or a string containing name of ssl profile.
object with ssl parameters or a string containing name of ssl profile. See SSL options.
Stringify objects instead of converting to values.
Stringify objects instead of converting to values. See issue #501. (Default: 'false')
When dealing with big numbers (BIGINT and DECIMAL columns) in the database, you should enable this option (Default: false).
The timezone used to store local dates.
The timezone used to store local dates. (Default: 'local')
Generates stack traces on Error to include call site of library entrance ("long stack traces").
Generates stack traces on Error to include call site of library entrance ("long stack traces"). Slight performance penalty for most calls. (Default: true)
Determines if column values should be converted to native JavaScript types.
Determines if column values should be converted to native JavaScript types. (Default: true)
The MySQL user to authenticate as.
MySQL Connection Options