MySQL create database

To create a database, you can use

create database DB_NAME;

Example

To create a database with specific charset use

Advertisement

create database DB_NAME character set utf8mb4 collate utf8mb4_bin

Or

create database DB_NAME character set utf8mb4 collate utf8mb4_unicode_ci;

You can use whatever character set you wish instead of utf8mb4.

Example

create database serverok_db2 character set utf8mb4 collate utf8mb4_unicode_ci;
mysql create database

To delete a database, use

drop database DB_NAME;
Add a comment

Leave a Reply

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

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Advertisement