0
I have a challenge and have searched MANY of the same type of issues. I have two tables with fields varbinary(128) that only shows blob in the table when viewing via workbench or phpadmin. This is deliberate to prevent prying eyes from seeing binary coded data. The fields are created under software and checked under software during operation and work fine for verifying BLOB data from encrypted ASCII input.
The original working Online MySQL 5.6.44 Linux
character_set_client utf8
character_set_connection utf8
character_set_database latin1
character_set_filesystem binary
character_set_results utf8
character_set_server latin1
character_set_system utf8
Notice the database and server are both latin1
with client utf8
.
Since the database and server are latin1, if you try to download, the two tables with BLOB will fail, requiring you to open them in latin1 which converts with hex in front. This is encrypted binary displayed in text and gives no information of the real encoded ASCII data. This is intended. If you download and upload the .sql to another server there should be no problem with correct binary transfer. I have found it often fails, so I extract the BLOB into decrypted ASCII in another table, then download the database and encrypt the ASCII back to BLOG so the program works fine.
I have been doing this for years with a working local MySQL 5.7.25 Windows
character_set_client utf8
character_set_connection utf8
character_set_database utf8
character_set_filesystem binary
character_set_results utf8
character_set_server latin1
character_set_system utf8
Notice the server is latin1
but everything else is utf8
.
Now I am trying to put the data on an NEW local server and it fails to operate. I can open in workbench and look at data and everything is correct. I can encrypt and decrypt the BLOB back and forth to ASCII so the data is there and verified.
But when I try to run the software I get the following error: Cannot connect to MySQL Server. Server sent charset unknown to the client.
The new computer is MySQL 8.0.17 Windows
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 utf8mb4
Notice all especially client and server are the same and database has been converted with software
This is totally confusing to me because the server and client have the same charset. The database tables are encrypted / decrypted and verified correct under workbench before operation.
It appears the varbinary(128) BLOB field is appearing as a different character set via the system to client giving the error “Cannot connect to MySQL Server. Server sent charset unknown to the client.”
I would appreciate any input on how to fix this. The varbinary(120) is decrypted and saved to a temporary varchar field. The database is downloaded. The temp varchar is encrypted and saved to the varbinary(128) in the new computer database. All data can be verified that it works and converts fine via workbench.
The closest I found was to change character-set-server utf8 but that is lower than client already accepts and it only effects new table creations I believe.