How to use MySQL Workbench

In the lesson you will learn how to start using MySQL Workbench, understanding its interface in details, and writing your first query.

Remember that MySQL Workbench is just a software that allow you to communicate to SQL Server easier.

What is MySQL Connection

First thing you notice when you open MySQL Workbench is that you should have a MySQL Connection in order to start using it.

Usually, a default connection is already created for you during setup. However, if you don't find a connection you can click on the plus sign (+) to add a new one.

Simply, this MySQL Connection is a stored information that can be used to connect to the MySQL Server. Basically a connection should contain:

  • Username – which is by default root.
  • Password – that you set it by yourself during installation.
  • IP Address (of MySQL Server) – which is by default or localhost.
  • Port number (used by MySQL Server) – which is by default 3306.

root is a user that have full permissions which mean that is allowed to execute all kind of orders in MySQL Server.

MySQL Workbench main window

After opening a connection, the main window will open as follows.

Now you can open the Schemas tab to view all available databases for the user you logged in with.

In the Schemas tab you may see some sample databases created for you by MySQL Workbench.

Now please notice where you should write queries, how to execute them and where the result should appears.

Write your first query

As a sample, write the following query to display all databases exist on your machine.



When you execute the query on your computer, the result should look similar to the following.

In the next lesson you will learn the basic syntax for writing SQL queries.


Online Tools