1--For each database:
2
3ALTER DATABASE
4 database_name
5 CHARACTER SET = utf8mb4
6 COLLATE = utf8mb4_unicode_ci;
7
8--For each table:
9
10ALTER TABLE
11 table_name
12 CONVERT TO CHARACTER SET utf8mb4
13 COLLATE utf8mb4_unicode_ci;
14
15--For each column:
16
17ALTER TABLE
18 table_name
19 CHANGE column_name column_name
20 VARCHAR(191)
21 CHARACTER SET utf8mb4
22 COLLATE utf8mb4_unicode_ci;
1ALTER TABLE
2 table_name
3 CONVERT TO CHARACTER SET utf8mb4
4 COLLATE utf8mb4_unicode_ci;
1ALTER DATABASE
2 database_name
3 CHARACTER SET = utf8mb4
4 COLLATE = utf8mb4_unicode_ci;
1ALTER TABLE
2 table_name
3 CHANGE column_name column_name
4 VARCHAR(191)
5 CHARACTER SET utf8mb4
6 COLLATE utf8mb4_unicode_ci;