Skip to content

Commit

Permalink
server: changes default encoding from UTF8_GENERAL_CI to UTF8MB4_UNIC…
Browse files Browse the repository at this point in the history
  • Loading branch information
dresende committed May 7, 2016
1 parent b586646 commit b6b7f06
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Readme.md
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
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

0 comments on commit b6b7f06

Please sign in to comment.