Create a database

Creating a database

You can create a new database with the following query.

CREATE DATABASE TestDB DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

The CREATE DATABASE and ALTER DATABASE statements have optional clauses to specify the database character set (CHARACTER) and collation (COLLATE).
Here we specify utf8mb4 and utf8mb4_general_ci, which are suitable for Japanese.
参考資料