title: Partial configuration of utf8 collations and charsets on MySQL 5.6
body: <p>I've been trying various configurations to force charset and collations to utf8. However, everything I tried has failed and some settings reflect the latin charset or collation.</p>
  
  <p>This is MySQL 5.6 on CentOS 6 from IUS repository.</p>
  
  <p>My config on /usr/share/mysql/my.cnf</p>
  
  <pre><code># The MySQL server
  [mysqld]
  port            = 3306
  socket          = /var/lib/mysql/mysql.sock
  skip-external-locking
  key_buffer_size = 16K
  max_allowed_packet = 1M
  table_open_cache = 4
  sort_buffer_size = 64K
  read_buffer_size = 256K
  read_rnd_buffer_size = 256K
  net_buffer_length = 2K
  thread_stack = 128K
  init_connect='SET collation_connection = utf8_unicode_ci'
  init_connect='SET NAMES utf8'
  character-set-server=utf8
  collation-server=utf8_unicode_ci
  skip-character-set-client-handshake
  </code></pre>
  
  <p>Settings through Heidi</p>
  
  <p><a href="https://i.stack.imgur.com/j4XdX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/j4XdX.png" alt="enter image description here"></a></p>
  
  <p>From the MySQL client</p>
  
  <pre><code>mysql&gt; show variables like 'char%';
  +--------------------------+----------------------------+
  | 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     | latin1                     |
  | character_set_system     | utf8                       |
  | character_sets_dir       | /usr/share/mysql/charsets/ |
  +--------------------------+----------------------------+
  8 rows in set (0.01 sec)
  
  mysql&gt; show variables like 'coll%';
  +----------------------+-------------------+
  | Variable_name        | Value             |
  +----------------------+-------------------+
  | collation_connection | utf8_general_ci   |
  | collation_database   | latin1_swedish_ci |
  | collation_server     | latin1_swedish_ci |
  +----------------------+-------------------+
  3 rows in set (0.00 sec)
  </code></pre>
  
  <p>I did not have any issues in 5.1 though.</p>
  
  <p><strong>Update #1</strong></p>
  
  <p>I've put <code>default-character-set = utf8</code>, in <code>client</code>, <code>mysqld</code> and <code>mysql</code> section of <code>my.cnf</code> and rebooted the MySQL service. Still the same thing, a mix of latin and utf8.</p>
  
  <pre><code>mysql&gt; show variables like 'char%';
  +--------------------------+----------------------------+
  | 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     | latin1                     |
  | character_set_system     | utf8                       |
  | character_sets_dir       | /usr/share/mysql/charsets/ |
  +--------------------------+----------------------------+
  8 rows in set (0.00 sec)
  
  mysql&gt; show variables like 'coll%';
  +----------------------+-------------------+
  | Variable_name        | Value             |
  +----------------------+-------------------+
  | collation_connection | utf8_general_ci   |
  | collation_database   | latin1_swedish_ci |
  | collation_server     | latin1_swedish_ci |
  +----------------------+-------------------+
  3 rows in set (0.00 sec)
  </code></pre>
  
  <p><strong>Update #2</strong></p>
  
  <p>My issues related to migrating a database using Migration Wizard through MySQL Workbench. The resulting database has collations and charsets that I don't want. If I run the produced script through Heidi, I get the same result as the migration result.</p>