Home > Database > Mysql Tutorial > How to create a database

How to create a database

王林
Release: 2020-07-15 11:10:52
Original
16487 people have browsed it

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 数据库名;
Copy after login

Example:

The following command simply demonstrates creating a database The process:

[root@host]# mysql -u root -p   
Enter password:******  # 登录数据库
mysql> create DATABASE RUN;
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template