In this step-by-step guide we’ll going to show you how easy it is to create a database in MySQL by using MySQL Workbench GUI.
How to Create a Database in MySQL using MySQL Workbench
The MySQL Workbench is a graphic tool for working with MySQL Servers and databases. It is cross-platform, open source, and easy to use.
We’ll assume you already have MySQL Workbench installed. Let us show you how we can use it to create a new database in MySQL.
First, launch the MySQL Workbench and click on the button as shown in the following screenshot to setup a new connection.
In the “Setup New Connection” dialogue box, type the name for the connection and click Test Connection button.
MySQL Workbench will display a dialog window. Type the password for the MySQL root user, check the “Save password in keychen”, and click OK button.
MySQL Workbench should say “Successfully made the MySQL connection”. Click OK.
Now under the “MySQL Connections” section you will see your connection listed. Double-click on it to connect to the MySQL Server.
Now we are ready to create the new database in MySQL. MySQL Workbench opens the window as shown in the following screenshot. Click the “Create a new schema in the connected server” button from the toolbar.
In the the following window you need to enter the “Schema name” and click the Apply button.
In MySQL, schema is synonymous with database. Creating a new schema also means creating a new database in MySQL.
Once you name your schema, click the Apply button and, when prompted, review the SQL Script and click Apply again.
MySQL Workbench should say “SQL script was successfully applied to the database”. Click Close.
Click on the arrow to the right of Administration to switch to the Schemas tab. You’ll see the new database created and showed in the Schemas tab.
After completing this tutorial, you should have a sense of how to create a database in MySQL using MySQL Workbench GUI. As we have seen above, it is pretty easy.
For more information about MySQL databases, see the MySQL documentation.