How do you create a database in MariaDB?
To create a database in MariaDB, you can use the statement CREATE DATABASE. Use the following syntax to create a database:
CREATE DATABASE database_name;
database_name is the name of the database you want to create.
For example, to create a database named “mydb,” you can execute the following command:
CREATE DATABASE mydb;
You can also specify some options for the database, such as character set and sorting rules. For example:
CREATE DATABASE mydb
CHARACTER SET utf8
COLLATE utf8_general_ci;
This will create a database named “mydb”, with the character set set to utf8 and the collation set to utf8_general_ci.