Ok, tak som si to teraz vyskúšal a počas inštalácie bol krátky sprievodca konfiguráciou. Konfiguračný súbor sa ale umiestnil do iného adresára, než som čakal. Jeho umiestnenie sa posiela v parametroch pri spúšťaní servera, takže presné umiestnenie sa dá nájsť vo vlastnostiach služby MySQL56 v services.msc. U mňa je to tu:
C:\ProgramData\MySQL\MySQL Server 5.6\my.ini
V konfigurácii mám hneď po inštalácii aj nastavenie znakovej sady:[mysql]
default-character-set=utf8
Všetko u mňa funguje normálne bez toho, aby som čokoľvek v konfigurácii menil:C:\Program Files\MySQL\MySQL Server 5.6\bin>chcp 65001
Active code page: 65001
C:\Program Files\MySQL\MySQL Server 5.6\bin>mysql -uroot -p
Enter password: ****
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.14-log MySQL Community Server (GPL)
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create database test_db charset=utf8 collate=utf8_general_ci;
Query OK, 1 row affected (0.00 sec)
mysql> use test_db
Database changed
mysql> create table test_tbl (test_col varchar(20));
Query OK, 0 rows affected (0.20 sec)
mysql> insert test_tbl values ('ľščťžýáí');
Query OK, 1 row affected (0.02 sec)
mysql> select * from test_tbl;
+------------------+
| test_col |
+------------------+
| ľščťžýáí |
+------------------+
1 row in set (0.00 sec)
mysql> show variables like 'character_set%';
+--------------------------+---------------------------------------------------------+
| Variable_name | Value |
+--------------------------+---------------------------------------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | C:\Program Files\MySQL\MySQL Server 5.6\share\charsets\ |
+--------------------------+---------------------------------------------------------+
8 rows in set (0.00 sec)
mysql> show variables like 'collation%';
+----------------------+-----------------+
| Variable_name | Value |
+----------------------+-----------------+
| collation_connection | utf8_general_ci |
| collation_database | utf8_general_ci |
| collation_server | utf8_general_ci |
+----------------------+-----------------+
3 rows in set (0.00 sec)