Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ When establishing a connection, you can set the following options:
* `password`: The password of that MySQL user.
* `database`: Name of the database to use for this connection (Optional).
* `charset`: 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'`)
of MySQL (like `utf8mb4_unicode_ci`). If a SQL-level charset is specified (like `utf8mb4`)
then the default collation for that charset is used. (Default: `'UTF8MB4_UNICODE_CI'`)
* `timezone`: The timezone used to store local dates. (Default: `'local'`)
* `connectTimeout`: The milliseconds before a timeout occurs during the initial connection
to the MySQL server. (Default: `10000`)
Expand Down
2 changes: 1 addition & 1 deletion lib/ConnectionConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function ConnectionConfig(options) {
this.maxPacketSize = 0;
this.charsetNumber = (options.charset)
? ConnectionConfig.getCharsetNumber(options.charset)
: options.charsetNumber||Charsets.UTF8_GENERAL_CI;
: options.charsetNumber||Charsets.UTF8MB4_UNICODE_CI;

// Set the client flags
var defaultFlags = ConnectionConfig.getDefaultFlags(options);
Expand Down