title: How to set character_set_database and collation_database to utf8 in my.ini?
body: <p>I've googled a lot about this problem. To sum up, this is what my <code>my.ini</code> looks like:</p>
  
  <pre><code>sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 
  
  [client]
  database = abcdef
  user = root
  password = XXXXXX
  default-character-set = utf8
  
  [mysql]
  default-character-set=utf8
  
  [mysqld]
  character_set_server=utf8
  max_connections = 200
  init_connect='SET collation_connection = utf8_general_ci' 
  init_connect='SET NAMES utf8' 
  </code></pre>
  
  <p>When I get into mysql via cmd and issue: <code>show variables like "%character%";show variables like "%collation%";</code>, this is what I got:</p>
  
  <pre><code>+--------------------------+---------------------------------+
  | Variable_name            | Value                           |
  +--------------------------+---------------------------------+
  | character_set_client     | utf8                            |
  | character_set_connection | utf8                            |
  | character_set_database   | latin1                          |
  | character_set_filesystem | binary                          |
  | character_set_results    | utf8                            |
  | character_set_server     | utf8                            |
  | character_set_system     | utf8                            |
  | character_sets_dir       | D:\env\MySQL5.6\share\charsets\ |
  +--------------------------+---------------------------------+
  8 rows in set (0.00 sec)
  
  +----------------------+-------------------+
  | Variable_name        | Value             |
  +----------------------+-------------------+
  | collation_connection | utf8_general_ci   |
  | collation_database   | latin1_swedish_ci |
  | collation_server     | utf8_unicode_ci   |
  +----------------------+-------------------+
  </code></pre>
  
  <p>I've already restart the MySQL service, so could anyone give me some idea on how to change <code>character_set_database</code> as well as <code>collation_database</code> to <code>utf8</code>? Thanks a lot.</p>