36

Does there exist any way to change the MySQL Workbench charset? My schema uses UTF-8 and when I view the table data (saved as UTF-8) or add data manually, it appears with charset errors, probably MySQL Workbench uses LATIN1.

Alasdair
  • 253,590
  • 43
  • 477
  • 449
Math
  • 361
  • 1
  • 3
  • 4

5 Answers5

28

I think OP was asking about charset that Workbench uses in its editor and how to setup Workbench to use UTF-8 in GUI - not how to setup default charset used for database table in Workbench. At the moment in Workbench one can set database table charset but regardless of it Workbench will in it's GUI represent data using Latin1 charset!!! Also inserting data into UTF-8 tables through Workbench will result with wrong chars in database. I don't know either how to make Workbench deal with UTF-8 in its GUI.

Amna Ali
  • 1,705
  • 1
  • 15
  • 19
sbrbot
  • 5,075
  • 3
  • 31
  • 63
  • 2
    Do you recommend another sql GUI tool? whatever I enter is being displayed as ?????? – Dejell Aug 16 '13 at 11:12
  • 1
    My RAD is NetBeans and it has built in database browser and editor. – sbrbot Mar 08 '14 at 09:37
  • 3
    I also think OP was asking about the charset that Workbench uses... most of this this this answer is wrong.. Workbench definitely handles UTF8 and utf8mb4 just find.. but the default connection charset is utf8 and you must call "SET names utf8mb4" after connecting http://stackoverflow.com/questions/32685368/mysql-workbench-connection-encoding – Brad Kent Feb 03 '16 at 20:53
  • @BradKent thanks, this was what I needed as I was trying to cut/paste into a column in workbench. – William T. Mallard Sep 30 '16 at 16:19
19

In "Model Overview", under "Physical Schemata", right-click the database and select "Edit Schema...". Define the character set to the "Collation"-field. (MySQL Workbench 5.2.35)

John Mayor
  • 527
  • 6
  • 13
  • 2
    Thanks for the tip, this worked for me; actually, charset and collation are two different things - afaiu - so I did not thought this would be the way. – jmclem Jan 31 '12 at 10:40
  • 4
    In WorkBench 5.2.44, its now under Alter Schema and still called Collation. It is true that you can't enter UTF-8 characters in edits from Workbench. Such a pain. – Mike_Laird Jan 25 '13 at 02:40
  • @Mike_Laird which other GUI for SQL would you advice for MAC? – Dejell Aug 16 '13 at 11:12
  • @Odelya, The MySQL Workbench is available for MAC OS X. I don't use Apple products and can't comment on any others. I would advise using Workbench for MAC. You'll get better support and can search for problem solutions from the whole Workbench community. FWIW. – Mike_Laird Aug 16 '13 at 18:12
  • note that this *does not* magically change what Workbench shows you, so if you are using a utf8mb4 column, you're still going to see nonsense bytes instead of proper unicode. – Mike 'Pomax' Kamermans Jun 15 '15 at 19:20
  • thank you very much. you saved me from editing the altering script every time I change the schema from the workbench EER diagram. and for the guys how asking for the character set not the collation. changing the collation is changing the character set implicitly – Accountant م Sep 22 '16 at 20:50
4

For further reading, another fix would be to change the display font. Go to Edit -> Preferences -> Appearance. Change the Editor font. It could be that the default font does not display utf-8 correctly, but others do.

Oh, and if you are having trouble changing your font you can try here

Community
  • 1
  • 1
demongolem
  • 8,796
  • 36
  • 82
  • 101
1

You have to set every fields utf8 or Table default at the alter table.

hasyee
  • 130
  • 1
  • 1
  • 8
0

I solved changing grid font as below.

Edit > Preferences > Fonts > Results Grid > Arial

mehmet riza oz
  • 471
  • 5
  • 17