To change MySQL database char set and collation, run
ALTER DATABASE DB_NAME_HERE CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
To usee current char set and collation, run
USE DB_NAME_HERE; SELECT @@character_set_database, @@collation_database;
You can specify char set when creating database with following syntax
CREATE DATABASE DB_NAME_HERE CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
Leave a Reply