1
|
mysql> show session variables like 'char%';
|
2
|
+--------------------------+----------------------------+
|
3
|
| Variable_name | Value |
|
4
|
+--------------------------+----------------------------+
|
5
|
| character_set_client | utf8 |
|
6
|
| character_set_connection | utf8 |
|
7
|
| character_set_database | utf8 |
|
8
|
| character_set_filesystem | binary |
|
9
|
| character_set_results | utf8 |
|
10
|
| character_set_server | latin1 |
|
11
|
| character_set_system | utf8 |
|
12
|
| character_sets_dir | /usr/share/mysql/charsets/ |
|
13
|
+--------------------------+----------------------------+
|
14
|
8 rows in set (0.01 sec)
|
15
|
|
16
|
mysql> show global variables like 'char%';
|
17
|
+--------------------------+----------------------------+
|
18
|
| Variable_name | Value |
|
19
|
+--------------------------+----------------------------+
|
20
|
| character_set_client | latin1 |
|
21
|
| character_set_connection | latin1 |
|
22
|
| character_set_database | latin1 |
|
23
|
| character_set_filesystem | binary |
|
24
|
| character_set_results | latin1 |
|
25
|
| character_set_server | latin1 |
|
26
|
| character_set_system | utf8 |
|
27
|
| character_sets_dir | /usr/share/mysql/charsets/ |
|
28
|
+--------------------------+----------------------------+
|
29
|
8 rows in set (0.01 sec)
|
30
|
|
31
|
mysql> show session variables like 'coll%';
|
32
|
+----------------------+-------------------+
|
33
|
| Variable_name | Value |
|
34
|
+----------------------+-------------------+
|
35
|
| collation_connection | utf8_general_ci |
|
36
|
| collation_database | utf8_general_ci |
|
37
|
| collation_server | latin1_swedish_ci |
|
38
|
+----------------------+-------------------+
|
39
|
3 rows in set (0.01 sec)
|
40
|
|
41
|
mysql> show global variables like 'coll%';
|
42
|
+----------------------+-------------------+
|
43
|
| Variable_name | Value |
|
44
|
+----------------------+-------------------+
|
45
|
| collation_connection | latin1_swedish_ci |
|
46
|
| collation_database | latin1_swedish_ci |
|
47
|
| collation_server | latin1_swedish_ci |
|
48
|
+----------------------+-------------------+
|
49
|
3 rows in set (0.00 sec)
|
50
|
|
51
|
mysql> SELECT character_set_name, COUNT(*) AS anzahl
|
52
|
-> FROM information_schema.columns
|
53
|
-> WHERE character_set_name IS NOT NULL
|
54
|
-> GROUP BY character_set_name;
|
55
|
+--------------------+--------+
|
56
|
| character_set_name | anzahl |
|
57
|
+--------------------+--------+
|
58
|
| latin1 | 3 |
|
59
|
| utf8 | 597 |
|
60
|
+--------------------+--------+
|
61
|
2 rows in set (0.04 sec)
|
62
|
|
63
|
mysql> SELECT table_catalog, table_schema, table_name, column_name
|
64
|
-> FROM information_schema.columns
|
65
|
-> WHERE character_set_name = 'latin1'
|
66
|
-> ORDER BY table_catalog, table_schema, table_name, column_name;
|
67
|
+---------------+--------------+------------------+-------------+
|
68
|
| table_catalog | table_schema | table_name | column_name |
|
69
|
+---------------+--------------+------------------+-------------+
|
70
|
| def | mysql | event | time_zone |
|
71
|
| def | mysql | ndb_binlog_index | File |
|
72
|
| def | mysql | user | Password |
|
73
|
+---------------+--------------+------------------+-------------+
|
74
|
3 rows in set (0.12 sec)
|
75
|
|