How to Create a Database In MySQL?

SQL stands for Structured Query Language, which is used to communicate with the database. SQL is only used for relational type databases. A relational database is a database that has a tabular method of sorting data, which consists of rows and columns. This article will discuss how to create a database in MySQL.

In this article, we will discuss the following topics - 

  • What is a Database?
  • What is MySQL?
  • What is Workbench?
  • How to Create a Database in MySQL

What is a Database?

A database is an organized collection of information so that it can easily be accessed and managed. Data is organized into rows, columns, and tables, and it is indexed to make it easier to find relevant information. There are many databases available, like MySQL, Sybase, Oracle, MongoDB, Informix, PostgreSQL, SQL Server, etc.

Full Stack Java Developer Course

The Gateway to Master Web DevelopmentExplore Course
Full Stack Java Developer Course

What is MySQL?

MySQL is a relational database management system. It is based on SQL(Structured Query Language). It is mainly used for a web database. It is a stable, reliable, and robust solution with very advanced features and advantages which are as follows:

  • Data security
  • On-demand scalability
  • High performance
  • Round-the-clock uptime
  • Comprehensive transactional support
  • Complete workflow control

What is Workbench?

MySQL Workbench is a visual database design and modeling tool that integrates SQL development, administration, database design, creation, and maintenance into a single integrated development environment for the MySQL database system.

sqlworkbench.

How to Create a Database in MySQL?

There are two methods by which you can create a new database in MySQL:

Method 1

Do the following steps to create a new database:

Step 1: Go to the navigation tab and click the Schema menu.

step1

Step 2:  The new schema window will appear. Enter the new database name (for example, new_database) without any spaces. Use the default charset and collation. Click on the apply button.

step2

Step 3: A new popup window will appear. Click on the apply button.

step3

Step 4: A new popup screen will appear. Click on the finish button to complete the database creation.

step4

Now you can see the new database in the schema menu. If you do not see the new database, click on the refresh icon in the schema menu. 

sql-create-database-in-MySQL

Method 2

The second method is by writing a query to create a new database.

Syntax: CREATE DATABASE databasename; 

Example:

create-database-in-MySQL-method2

Conclusion

In this article, we learned how to create a simple database in MySQL. We also discussed databases and workbench. If you wish to learn more about MySQL, then check out our SQL certification course.

This SQL certification course gives you all of the information you need to successfully start working with SQL databases and make use of the database in your applications. Learn how to correctly structure your database, author efficient SQL statements, and clauses, and manage your SQL database for scalable growth.

If you have any questions, please feel free to ask them in our comments section, and our experts will answer them for you promptly. 

About the Author

Aryan GuptaAryan Gupta

Aryan is a tech enthusiast who likes to stay updated about trending technologies of today. He is passionate about all things technology, a keen researcher, and writes to inspire. Aside from technology, he is an active football player and a keen enthusiast of the game.

View More
  • Disclaimer
  • PMP, PMI, PMBOK, CAPM, PgMP, PfMP, ACP, PBA, RMP, SP, and OPM3 are registered marks of the Project Management Institute, Inc.