I\'ve googled a lot about this problem. To sum up, this is what my my.ini looks like:
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[cli
How to configure Character Set and Collation.
For applications that store data using the default MySQL character set and collation (
latin1, latin1_swedish_ci), no special configuration should be needed. If applications require data storage using a different character set or collation, you can configure character set information several ways:
utf8, whereas applications that
use another database might require sjis.The examples shown here for your question to set utf8 character set , here also set collation for more helpful(utf8_general_ci collation`).
Specify character settings per database
CREATE DATABASE new_db
DEFAULT CHARACTER SET utf8
DEFAULT COLLATE utf8_general_ci;
Specify character settings at server startup
[mysqld]
character-set-server=utf8
collation-server=utf8_general_ci
Specify character settings at MySQL configuration time
shell> cmake . -DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci
This May be lengthy answer but there is all way, you can use. Hopeful my answer is helpful for you. for more information http://dev.mysql.com/doc/refman/5.7/en/charset-applications.html