Install and Configure MySQL Workbench on Ubuntu 16.04
Updated by Linode Written by Linode
MySQL Workbench is a feature-rich graphical tool used to model data, build SQL queries, manage MySQL servers, and more. This guide will show you how to install Workbench using the Ubuntu package manager.
Before You Begin
Update repositories and upgrade if necessary:
sudo apt update && sudo apt upgrade
Install MySQL Workbench
Install MySQL Workbench using the APT package manager:
sudo apt install mysql-workbench
Run MySQL Workbench
Launch MySQL Workbench from the terminal:
To view more launch options from the command line interface, use the
MySQL Workbench shows this welcome screen on first run:
Configure MySQL Workbench
Use the built-in Workbench Preferences to adjust settings such as targeted MySQL server version, font color, code completion, and others.
To open the preferences, click on
Preferences in the main menu:
Optional: Load a Sample Database into MySQL Server
Access the MySQL server on your Linode via SSH and download the sample Sakila database provided in the MySQL documentation:
tar -xzvf sakila-db.tar.gz
Open MySQL Workbench on your local machine and click
+to create a new connection:
Create a Connection Name. Click the Connection Method dropdown menu and select
Standard TCP/IP over SSH. Complete the credentials for SSH and MySQL user login:
NoteThe MySQL server default port should be
l188.8.131.52. If you wish to connect to another server with a different port, update the inputs accordingly. See Deploy MySQL Workbench for Database Administration for more information.
Under File, select Run SQL Script…. Select
sakila-schema.sqlthen click Run:
Repeat Step 5 for
Query1tab, use the sample query below to see a Result Grid of selected data:
USE sakila; SELECT * FROM actors WHERE first_name LIKE 'A%';
The sample database provides a sandbox in which to test configurations and show how to integrate them into your workflow. MySQL Workbench offers a graphical interface to view database models in addition to building queries. While there are plenty of features, free and commercial, lightweight alternatives are available, depending on needs of the user. MySQL Workbench remains a great choice for most database administration tasks.
You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.
- Create Physical Backups of your MariaDB or MySQL Databases
- Use mysqldump to Back Up MySQL or MariaDB
- Install and Manage MySQL Databases with Puppet Hiera on Ubuntu 16.04
- LAMP on CentOS 7
- Java Development with WildFly on CentOS 7
This guide is published under a CC BY-ND 4.0 license.