How to create a mysql database
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.