Search code examples
mysqlutf-8mysql-workbenchmariadblatin1

How to set MySQLworkbench connection encoding to UTF8?


My MariaDB 10 database is UTF8 at the column, table, and database level. But I just created a new table in the db using MySQL Workbench and it was created by default as Latin1.

Googling shows one potential reason is if the client connects using Latin1 rather than UTF8.

1) Is there a way in MySQL Workbench to check the connection encoding?

2) Is there a way to set the default connection encoding to UTF8?

The most recent answer I could find was from 2011 and said MySQL Workbench only supported Latin1, but surely UTF8 is supported by now...


Solution

  • I'd like to see where you found the posting that said MySQL Workbench would only support Latin 1. That's just nonsense. The application has always been using UTF-8 internally for all string processing and for all communication. Since day 1. So, the encoding used by MySQL Workbench is certainly not the reason why your table's charset was set to Latin 1 at creation time. I'd rather suspect a problem between MariaDB and WB, but that's just a wild guess.

    When you create a table and leave it's charset at the default, that means there is no charset given and the server is responsible to use the current schema default charset. So, rather look there. As a test you could create a table with an explicit charset (also something other than Latin 1 and UTF-8), just to see that works as expected.