The first way involves creating a database directly from the MySQL, while in the other way we use MySQL Workbench.īefore explaining each one of the two ways for creating a database in MySQL, let’s first inspect the MySQL Create Database statement. So, this is the basic MySQL workbench tutorial for Ubuntu, which should be enough to make you familiar with MySQL Workbench and start your journey in database management.Although the underlying principle remains the same, there are two ways in which a database is created in MySQL. Here you can import schemas and restore them to previous ones. Similarly, under schema privileges, you can select permissions you want to give like to select, alter, create, etc. Under the administrative roles tab, you can choose the roles for which you want to give permissions. In the future, they can reassess the permissions and make changes to them according to requirements. Here, administrator can add a specific user, and give them access to edit and work on databases and schemas. Here, they can monitor the connection status, number of connections, and traffic. Under this tab database admins, can keep track of the performance of the currently connected database. Apart from that, you can be a server admin and create/manage server instances, manage security, create and manage different users, and give them permissions to work on MySQL objects and perform import/export. So, these are the basic things you can do with MySQL workbench. On top of that, you can also migrate from earlier versions of MySQL to the latest releases. It is a great feature to migrate the data from other databases like Microsoft SQL server, Microsoft Access, Sybase ASE, SQLite, and other relational database management systems (RDBMS). Also, you can add scripts under the SQL Scripts drop-down. You can use the schema privileges drop-down to add users and various user roles. Here you can see various buttons like Add Diagram, Add Table, Add View, Add Routine, and Add Groups. The data modeling window is something that looks like what is shown in the following screen shot. You can also add various fields to your database using its comprehensive table editor, which is very easy to use and offers tools to edit tables, columns, indexes, and various more. Data ModelingĪs the name suggests, it will help you create models of your database graphically and allow you to perform reverse and forward engineering between schema and live databases. You can see in the above screenshot that table named, LINUXHINT1, is created in the output pane.
Don’t forget to select the default schema before executing any query. It means you can see the result immediately.įor example, let’s create a table named LINUXHINT1 and try to execute it. The output pane here gives you output to any query you run or execute. Here you can start creating and managing databases. The following window will appear with a tab named Query 1 on successful connection to the database.
#CREATE DATABASE MYSQL WORKBENCH PASSWORD#
You can also check Save the password in keychain to remember it for future use. It will connect to the database named, localhost. Click on Databases and then Connect to Database, a new window will appear similar to the below screenshot, here you need to click Ok, and then, it will ask for a MySQL server password.Įnter your password and click Ok. This is the first module in MySQL workbench that enables database administrators to create and manage connections to database servers.įor example, let me show you how you can connect to localhost. For each of these, there is a separate tab present on the MySQL Workbench home screen. So, there are three modules in MySQL Workbench, SQL Development, Data Modeling, and Migration. Here you will be able to perform database admin tasks, right from creating a database to configuring and executing database servers.
#CREATE DATABASE MYSQL WORKBENCH HOW TO#
So, in this article, I am going to give a tour of MySQL Workbench and show you how to use it.Īfter installation, when you launch MySQL workbench for the first time, it somewhat looks like the following screenshot. It is a powerful tool that enables us to visualize modules for creating, executing, and optimizing several queries. Workbench makes the task easier for database admins by providing important tools to manage databases and users, creating databases, running SQL queries, setting up and configuring servers, and many more.
MySQL Workbench is a cross-platform GUI client for MySQL database users and administrators.