diff --git a/Readme.md b/Readme.md index 2f34a6d3d..7283e0258 100644 --- a/Readme.md +++ b/Readme.md @@ -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`) diff --git a/lib/ConnectionConfig.js b/lib/ConnectionConfig.js index f15d5a0ab..07dd3f29e 100644 --- a/lib/ConnectionConfig.js +++ b/lib/ConnectionConfig.js @@ -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);