The method to create a database is: after logging in to the mysql service, use the create command to create it. The specific operations are: 1. Execute the command [mysql -u root -p] to log in to mysql; 2. Execute the command [create DATABASE database name] to create a database.
#We can use the create command to create a database after logging in to the MySQL service.
(Recommended learning:mysql tutorial)
Syntax:
CREATE DATABASE 数据库名;
Example:
The following command simply demonstrates creating a database The process:
[root@host]# mysql -u root -p Enter password:****** # 登录数据库 mysql> create DATABASE RUN;
The above is the detailed content of How to create a database. For more information, please follow other related articles on the PHP Chinese website!