Get the App
SLTechnology News&Howtos  ›  Database  › 

How to create a mysql database

Shulou Source: shulou.com Published: 2022-06-01 09:02:28 10月17日 Update

Today, I will talk to you about how to create a mysql database, many people may not know much about it. In order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.

Mysql creates a database by using the create command, syntax format: [CREATE DATABASE database name;]. For example: [CREATE DATABASE aa;] means to create a database called aa.

Use the create command to create the database with the following syntax:

CREATE DATABASE database name

For example:

Create a database named aa:

[root@host] # mysql-u root-p Enter password:* # log in to terminal mysql > create DATABASE aa

Related recommendations:

Drop command format:

Drop database

For example, delete a database named aa:

Mysql > drop database aa

Note: be careful when deleting a database, as all data will disappear after the delete command is executed.

After reading the above, do you have any further understanding of how to create a mysql database? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

Tags: Data database command content format grammar backward method more knowledge article terminal industry information channel process channel enter one recommend support Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno MySQL MariaDB Shulou Technology Shulou Tech Info