Bug #78503 MySQL WorkBench's Encoding is Hardcoded to UTF-8
Submitted: 21 Sep 2015 15:51 Modified: 22 Sep 2015 7:48
Reporter: Nicolas Bouvrette Email Updates:
Status: Verified Impact on me:
Category:MySQL Workbench Severity:S4 (Feature request)
Version:6.3 OS:Any
Assigned to: CPU Architecture:Any
Tags: configuration option, MySQL WorkBench 6.3, UTF-8, utf8mb4

[21 Sep 2015 15:51] Nicolas Bouvrette
Given that the current MySQL UTF-8 implementation does not support 4 bytes characters, it would make sense to be able to configure WorkBench to support other encoding than UTF-8 by default.

How to repeat:
Create a column in a table using utf8mb4 and perform a query such as

SELECT * from exampleTable WHERE exampleField = 'é';

You will get the following error:

Error Code: 1267. Illegal mix of collations

The only fix right now is to run this command:

SET NAMES 'utf8mb4' COLLATE 'utf8mb4_unicode_ci'

See details here:


Suggested fix:
To keep this fix generic, considering MySQL will eventually move to a true UTF-8 support (keeping the same name), MySQL workbench could add an option called "Run after start" in the connection options. This way we could run this query on given connections to solve the problem.

This could also give the opportunities to solve other potential challenges with MySQL Workbench (I'm thinking there would be more use cases).

Other options could also be :

- Encoding configuration on the connection level (less generic)
- Automatically adjust encoding of the client based on table encoding (could be interesting as well)
[22 Sep 2015 7:48] MySQL Verification Team
Hello Nicolas Bouvrette,

Thank you for the feature request!