How To

Install MySQL Workbench on Ubuntu 18.04: SSH Connections Guide

MySQL Workbench is a cross-platform graphical tool for MySQL database administration. It brings together everything a database developer or administrator needs in one interface — a SQL query editor, schema designer, user and privilege management, server configuration, backup tools, and database migration support.

Instead of managing MySQL purely through the command line, Workbench gives you a visual way to browse tables, run queries, manage users, and monitor server performance.

This guide shows you how to install MySQL Workbench on Ubuntu 18.04 and how to configure a remote database connection using SSH tunneling.

<strong>Prerequisite:</strong>&nbsp;You need sudo access.

Install MySQL Workbench on Ubuntu

MySQL Workbench is available in Ubuntu’s default repositories. Update the package list and install it:

bashsudo apt updatesudo apt install mysql-workbench
<strong>Note:</strong>&nbsp;The version in Ubuntu's default repositories may not always be the latest release. Visit the&nbsp;<a href="https://dev.mysql.com/downloads/workbench/">MySQL Workbench downloads page</a>&nbsp;to download a specific version if needed.

Once installed, launch it from the Activities menu or from the terminal:

bashmysql-workbench

The MySQL Workbench home screen appears on first launch. It shows your saved connections and gives you quick access to the schema designer, migration tools, and query history.

Connect to a Remote MySQL Server via SSH Tunnel

One of the most useful features in MySQL Workbench is SSH tunneling. Instead of exposing your MySQL server port to the internet, you connect to the database through an SSH session. Your MySQL port stays private — you only need SSH access to the remote host.

To add a new connection, click the  icon next to “MySQL Connections.”

In the setup form that opens, fill in the following fields:

  • Connection Name: A descriptive name for this connection
  • Connection Method: Select Standard TCP/IP over SSH
  • SSH Hostname: Your server’s IP address or hostname, followed by the SSH port (default: 22)
  • SSH Username: The username you use to SSH into the server
  • SSH Authentication: Enter your password or point to your SSH private key file
  • MySQL Hostname: Leave this as 127.0.0.1
  • MySQL Username and Password: Your MySQL database login credentials

Click Test Connection when done. If this is your first time connecting to the server, MySQL Workbench shows an “SSH Server Fingerprint Missing” prompt; click Continue to accept and save the fingerprint.

A successful test shows a confirmation message. Click OK and then Close. The new connection appears on the Workbench home screen. Double-click it to open.

What You Can Do Once Connected

After connecting, MySQL Workbench gives you full access to the remote server from your local machine. The Schema panel on the left lists all databases and their tables.

From here you can:

  • Write and run SQL queries in the built-in editor
  • Create, modify, or drop tables and databases
  • Manage user accounts and privileges
  • Export and import data using the built-in backup tools
  • Use the EER diagram editor to visualize table relationships

To keep MySQL Workbench up to date, run a standard system upgrade:

bashsudo apt updatesudo apt upgrade

MySQL Workbench is now installed and connected to your remote MySQL server on Ubuntu 18.04. The SSH tunnel approach keeps your database secure without any extra firewall configuration. Leave a comment below if you run into any issues during setup.

Cyber Defence

Recent Posts

Install phpMyAdmin on Ubuntu 18.04 with Apache: Setup Guide

phpMyAdmin is a free, open-source PHP application that provides a browser-based interface for managing MySQL and…

1 day ago

Install Zabbix on Ubuntu 18.04: Server Setup with MySQL Backend

Zabbix is a mature open-source infrastructure monitoring platform that collects metrics from network devices, servers, virtual…

1 day ago

Install Gradle on Ubuntu 18.04: Set Up OpenJDK and Environment

Gradle is a powerful open-source build automation tool used primarily for Java, Kotlin, Groovy, and Android…

1 day ago

Install TeamViewer on Ubuntu 18.04: Download the .deb and Set Up

TeamViewer is a proprietary cross-platform remote access application for remote control, desktop sharing, file transfer, and online meetings. It is one of the most widely used remote support tools in the world, available for Windows, macOS, Linux, iOS, and Android. TeamViewer is not included in the Ubuntu repositories because it is proprietary software. This guide covers how to install TeamViewer on Ubuntu 18.04 using the official .deb package. The same steps apply to Ubuntu 16.04, Debian, Linux Mint, and Elementary OS. <strong>Prerequisite:</strong>&nbsp;You&nbsp;need&nbsp;sudo&nbsp;access. Install TeamViewer on Ubuntu: Download the .deb Package Download the official TeamViewer .deb package. The _amd64.deb suffix indicates this package is for 64-bit x86-64 systems. For ARM-based machines, download the appropriate package from the TeamViewer Linux downloads page: bashwget https://download.teamviewer.com/download/linux/teamviewer_amd64.deb Install the package using apt. The ./ prefix tells apt this is a local file path, not a package name from the repositories:…

1 day ago

Install Nagios Core on Ubuntu 18.04: Build from Source Guide

Nagios is one of the most widely used open-source infrastructure monitoring systems in the world. It…

1 day ago

Install Laravel on Ubuntu 18.04 with Composer: Setup Guide

Laravel is an open-source PHP web application framework built around an expressive, developer-friendly syntax. It is…

2 days ago