Skip to content

Encoding not recognized: 'undefined' error when connecting to MySQL 8.0+ servers that use utf8mb4_0900_bin collation. #3856

@kangsorang

Description

@kangsorang

Problem Description

MySQL2 driver throws Encoding not recognized: 'undefined' error when connecting to MySQL 8.0+ servers that use utf8mb4_0900_bin collation.

Error Details

Error: Encoding not recognized: 'undefined' (searched as: 'undefined')
    at Object.getCodec (/node_modules/iconv-lite/lib/index.js:109:15)
    at Object.getDecoder (/node_modules/iconv-lite/lib/index.js:129:21)
    at exports.decode (/node_modules/mysql2/lib/parsers/string.js:20:23)
    at new ColumnDefinition (/node_modules/mysql2/lib/packets/column_definition.js:47:30)
    at Query.readField (/node_modules/mysql2/lib/commands/query.js:198:21)
    at Query.execute (/node_modules/mysql2/lib/commands/command.js:45:22)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions