Description:
There is an error saying "Unknown character set: ''" while connecting to database. At first I thought the error root was character set setting in the error database because I could connect to other databases normally. After asking colleague I find I could connect to the error database by command line or Navicat. As a user using MySQL Workbench for 6 years, I haven't met this error before. So I start wondering whether there is something wrong with MySQL Workbench. After testing all versions by dichotomy, I'm sure this error was imported in version 8.0.13. Now I'm using 8.0.12 to connect to the error database. I can't get anything useful from the error message. All information I can provide is as following.
1. Error message:
Failed to Connect to MySQL at xxx.xxx.xxx.xxx:3306 with user xxx. Unknown character set: ''.
2. After connected to the error database, I got these variables' value by running command 'show variables like "%character%"'.
character_set_client: utf8mb4
character_set_connection: utf8mb4
character_set_database: utf8mb4
character_set_filesystem: binary
character_set_results: utf8mb4
character_set_server: utf8mb4
character_set_system: utf8
character_sets_dir: /opt/tiger/app/ndb-1.0.0/share/charsets/
3. I also got these variables' value from another database which could be connected functionally.
character_set_client: utf8mb4
character_set_connection: utf8mb4
character_set_database: utf8
character_set_filesystem: binary
character_set_results: utf8mb4
character_set_server: utf8mb4
character_set_system: utf8
character_sets_dir: /opt/tiger/app/ndb-1.0.0/share/charsets/
How to repeat:
1. OS system: MacOS Big Sur 11.3.1
2. MySQL Workbench: 8.0.13+
3. Because the error message is so limited, I can't provide more info to repeat the error. I suppose the error root is the character set setting. Please read the variables value in "Description".