Home  >  Article  >  Database  >  How to create a database

How to create a database

王林
王林Original
2020-07-15 11:10:5216380browse

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.

How 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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn