MySQL Database Character Set and Collation

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;
Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *