Home > Database > Mysql Tutorial > body text

How to create a database in mysql?

藏色散人
Release: 2020-09-19 14:16:14
Original
58280 people have browsed it

How to create a database in mysql?

How to build a mysql database?

1. Download mysql, install it, then open cmd and cd to the location of mysql directory, and then enter mysqld to start the mysql server

2. View all current databases: show databases;

3. Create a database: create database database name; (The test_db database is created here, and then Use the 1 command to view all databases)

4,

How to create a database in mysql?

Now the database is created, the next step is to create the database table, for example, we create it in test_db A table for tb_user, which contains the fields email, password

5. Switch the current database to test_db

Command use test_db;

6、

How to create a database in mysql?

7. Create table TB_USER. After the creation is successful, use show tables to see if the table is created successfully.

8.

How to create a database in mysql?

##Related learning recommendations:

mysql database

The above is the detailed content of How to create a database in mysql?. 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