user765368
user765368

Reputation: 20356

Change default_character_set while connected to mysql

Is there any way to change the --default-character-set to utf8 while connected to MySQL (meaning in the mysql> shell) for a particular database? I tried something like:

mysql> --default-character-set=utf8 database_name

But that doesn't work.

Any help please

Upvotes: 0

Views: 209

Answers (1)

Voislav Sauca
Voislav Sauca

Reputation: 3075

In the /config/database.properties add the characterEncoding:

connectionProperties.characterEncoding=UTF-8

Or in shell this link is very useful.

Upvotes: 1

Related Questions