Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL Workbench charset

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.

like image 925
Math Avatar asked Jul 28 '11 13:07

Math


People also ask

What is default charset for MySQL workbench?

The default MySQL server character set and collation are latin1 and latin1_swedish_ci , but you can specify character sets at the server, database, table, column, and string literal levels.

How do I find my MySQL charset?

To see the default character set and collation for a given database, use these statements: USE db_name; SELECT @@character_set_database, @@collation_database; Alternatively, to display the values without changing the default database: SELECT DEFAULT_CHARACTER_SET_NAME, DEFAULT_COLLATION_NAME FROM INFORMATION_SCHEMA.

How do I make MySQL handle UTF-8?

To change the character set encoding to UTF-8 for the database itself, type the following command at the mysql> prompt. Replace dbname with the database name: Copy ALTER DATABASE dbname CHARACTER SET utf8 COLLATE utf8_general_ci; To exit the mysql program, type \q at the mysql> prompt.


1 Answers

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.

like image 118
sbrbot Avatar answered Sep 28 '22 03:09

sbrbot