MySQL shell: Enable UTF-8

When you do a script/dbconsole -p, your MySQL shell will already be using UTF-8. When you call it yourself using mysql, it may not be enabled.

You'll notice that when you get ASCII salad and/or question marks instead of special characters. \
Example: Hlavn� m?sto Praha instead of Hlavní město Praha.

You need to manually switch on UTF-8, in the MySQL console:

SET NAMES 'utf8';
Arne Hartherz About 12 years ago