Install and Get Started with MySQL Workbench on Ubuntu 18.04

November 19, 2019


MySQL Workbench is a unified visual tool for database management. Its graphical interface provides database architects and administrators with an easier way to model data, build and run SQL queries, and maintain a database.

In this tutorial, you will learn how to install, configure, and get started with MySQL Workbench on Ubuntu 18.04.

How to Install and get started with Workbech on Ubuntu.


  • An Ubuntu 18.04 Linux system
  • Access to a command-line/terminal window (Ctrl+Alt+T)
  • A user account with sudo privileges
  • A MySQL server (as Workbench is designed to work with MySQL databases)

Download and Install MySQL Workbench

MySQL Workbench is very easy to install and available in the local repository. The only thing you need to do is download the package.

As a rule, you should always update and upgrade your system, before any installation:

sudo apt update && sudo apt upgrade

Now you can download and install Workbench with the command:

sudo apt install mysql-workbench

Launch MySQL Workbench

Once you have installed the software, launch the database management tool:


The command will prompt Workbench to launch and a new window will appear.

mysql workbench home screen showing mysql connections

If you prefer using the GUI, you can launch Workbench by searching for it in the Activities menu and clicking on the icon as seen below.


Configure MySQL Workbench

Before you start managing databases, you may want to modify the default settings. To do so, open the Edit drop-down menu and select Preferences.

edit preferences in mysql workbench

The Workbench Preferences window will appear, consisting of several sections:

  • General Editors
  • SQL Editor
  • Administration
  • Modeling
  • Fonts & Colors
  • Others

Click through the tiles, inspect all the options, and adjust them to fit your needs.

Connecting to a Database

With Workbench installed and configured, you are ready to establish a connection with a database on a local or remote server.

The software automatically creates connection tiles for local servers already set up on the system.

Note: You can only connect to MySQL servers that have already been installed, enabled, and configured for communication. If you are having problems installing MySQL, take a look at our guide on How to Install MySQL on Ubuntu 18.04.

To add a new connection, click on the plus (+) sign on the home page.

add a new connection in workbench

The Setup New Connection dialogue will appear asking for connection information. The parameters will change according to the connection method selected.

Connecting to a Local Database

By default, the dialogue window for new connections fills in the parameters for a local connection that uses the Standard (TCP/IP) connection method. Use this suite if you want to communicate via an IP network.

Local MySQL servers are set to use port 3306. Keep the information as is, unless you have configured a different port number for your local server.

If you are connecting to a newly created server, leave root as the username as it is the only one with system-wide permission. However, to avoid security risks, you can create a new MySQL account and grant the required privileges.

Click on the Test Connection button. If the parameters are correct, the output will inform you it has managed to connect to the server.

output that you are connected to the server

Connect to a Remote Database over SSH

Workbench allows users to quickly set up SSH tunneling and ensure secure communication with remote machines.
If you want to establish a new connection with a remote server over SSH, start by setting the connection method to Standard TCP/IP over SSH. This will open additional parameters.

Apart from the standard requirements, this method asks for several other specifications:

  • SSH Hostname
  • SSH Username
  • SSH Password
  • SSH Key File

Fill in the details and try out the configuration by clicking Test Connection, as shown below.

establish a new connection over SSH with a remote server

Note: Make sure the firewalls on your machines are set to allow communication on the required ports. Add a rule for outbound connections on the host machine and a rule for outbound connections on the remote server.

Uninstall MySQL Workbench

To remove or uninstall MySQL Workbench on an Ubuntu system, use the command:

sudo apt remove mysql-workbench


With the help of this article, you should now know how to install MySQL Workbench on Ubuntu. You also learned how to configure the software and enable connections with MySQL databases.

The next thing you should learn is how to create a database with MySQL Workbench.

Was this article helpful?
Sofija Simic
Sofija Simic is an aspiring Technical Writer at phoenixNAP. Alongside her educational background in teaching and writing, she has had a lifelong passion for information technology. She is committed to unscrambling confusing IT concepts and streamlining intricate software installations.
Next you should read
How To Show a List of All Databases in MySQL
July 23, 2019

With Structured Query Language (SQL), you can easily access and manage content in all your databases. This...
Read more
How to Check the MySQL Version In Linux
July 11, 2019

It is essential to know which version of MySQL you have installed. The version number helps to determine if a...
Read more
How To Set Up MySQL Master Slave Replication
May 29, 2019

In cloud computing, master-slave data replication refers to storing the same information on multiple servers.
Read more
How to Rename a MySQL Database
May 6, 2019

As an administrator, you may need to rename a database. However, for security, the command to rename a...
Read more
  • © 2021 Copyright phoenixNAP | Global IT Services. All Rights Reserved.