-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcharacter-set.txt
More file actions
62 lines (57 loc) · 2.91 KB
/
character-set.txt
File metadata and controls
62 lines (57 loc) · 2.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
show variables like 'character%';
show variables like 'collation%';
show variables like “collation_database”;
ALTER DATABASE lyac DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER DATABASE lyac CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE activities CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE attachments CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE bands CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE bands_groups CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE callsigns CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE countries CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE emails CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE list CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE logs CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE messages CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE modes CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE prefixes CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE qsorecords CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE qsotrash CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE rounds CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE turnout CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE wwls CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
/etc/my.cnf
[mysqld]
#
init_connect='SET collation_connection = utf8_utf8_general_ci'
init_connect='SET NAMES utf8'
character-set-server=utf8
collation-server=utf8_utf8_general_ci
skip-character-set-client-handshake
#
Restart the MySQL
sudo /etc/init.d/mysql stop
sudo /etc/init.d/mysql start
mysql> show variables like 'character%';
+--------------------------+----------------------------+
| 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 | /usr/share/mysql/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)