

Right now, we have the following databases.
#Database workbench 4 password#
Our username is the root, and the password is 12345, yours may be different. Here -u means username, -p means password. Go to the path where MySQL is installed and use the following command to login: mysql -u root -p 12345 Open your command prompt as an administrator.

Right click in the Navigator pane, select Create Schema, name your database, and click apply (as we already did in method 1).Ĭreate New Database Using MySQL Workbench - Using Command Prompt You can also create a database from the Navigator pane.

You may have noticed that the database can be created using both commands CREATE SCHEMA DB_name and CREATE DATABASE DB_name in MySQL Workbench.Ĭreate New Database Using MySQL Workbench - Using Navigator First, create a SQL file (red box number 1 in the following screenshot), write the commands (red box number 2), press the refresh button (red box number 3), and see the recently created schemas (red box number 4). To create a new database using SQL query, follow the steps given in the following screenshot. Please note that the other database named sys is the default database.Ĭreate New Database Using MySQL Workbench - Using SQL Query Database under the Navigator window (see the following screenshot). The following window will show up click on Finish. Please note that you can also write more SQL queries in the red box. The following window will open click Apply. You will see the following screen, name your schema, and click Apply button. Click on the Database icon in the menu bar (highlighted in red in the following screenshot). Now, you can see your connection as follows.Ĭreate New Database Using MySQL Workbench - Using Menu BarĬlick on your connection it will open the window as follows. You will see the following message click OK again. The following screen will appear.Įnter the password that you used during MySQL Workbench installation and click OK. Default Port number is 3306 for MySQL, but you can change it in case if it is already occupied, then click on Test Connection. Write the connection name of your choice. If there is no connection, then click on ‘+’ (Plus sign) highlighted in the red box and create a connection as follows. There can be multiple connections if you have created them. To create a new database, you have to launch the MySQL Workbench first.

We are using MySQL Workbench Version 8.27 for this tutorial (you may get the latest version from here) Create New Database Using MySQL Workbench This article will also show you how you can create a new database using Command Prompt. We will see different ways to have a new database using a navigator, SQL query, and menu bar. It is important to know that database is also known as Schema in MySQL Workbench. The Graphical User Interface of MySQL Workbench saves time and effort and lets the user focus on productivity rather than struggling with queries. MySQL Workbench is a visual tool for programmers and database architects to make their job easy. Create New Database Using MySQL Workbench - Using Command Prompt.Create New Database Using MySQL Workbench - Using Navigator.Create New Database Using MySQL Workbench - Using SQL Query.Create New Database Using MySQL Workbench - Using Menu Bar.Create New Database Using MySQL Workbench.
