If you are looking for software to use, go to Huajun Software Park! software release

How to create a new database in mysql? -mysql new database tutorial guide

Author: Shaobing Date: 2022-11-01

MYSQL
MYSQL-8.1.0 Chinese version

programming tools Storage size: 146 MB Time: 2022-10-13

Software Description: High availability is important because your data is important. If your database fails, whether due to human error, catastrophic network failure...

Download now

Friends, do you know how to create a new database in MySQL? Today I will explain the tutorial guide for creating a new database in MySQL. If you are interested, come and take a look with me. I hope it can help you.

79489

Under Windows, if your MySQL is installed in D:MySQL, you can do this:

1. First switch to its bin directory

1

cd D:MySQLbin

1

D:MySQLbin>mysql -u root -p

2. Then enter your root password

Next, you can create databases, create users, create and modify tables and other operations (common commands are as follows).

3. View existing database

1

mysql> show databases;

mysql creates a database (if the database is named mydb)

1

mysql> create database mydb;

Delete the database (if the database is named mydb)

1

mysql> drop database accounts;

Use database (if using database mydb)

1

mysql>use mydb;

After executing the database command, you can create, modify, insert, delete tables and other operations on the database. A database is equivalent to an Excel file, and a table is equivalent to the cells of the Excel file, and the data is stored in the table.

The above is what the editor brings to youmysql new databaseTutorial strategyAll the content, I hope it can help everyone.

Related articles