Install MySQL Workbench on CentOS 7 / RHEL 7 / Amazon Linux 7

Posted on 229 views

MySQL is a free and open-source relational database management system developed by Oracle Corporation. In relational databases, data is stored in separate tables and database structures organized into physical files that increase speed and performance.

In many situations, the MySQL database is managed through the command line. This method requires one to understand/memorize the commands. However, there are many graphical tools that can be used to manage the MySQL database. These tools include; Azure Data Studio, dbForge Studio, phpMyAdmin, HeidiSQL, Toad Edge, SQLyog, Navicat, Aqua Data Studio, Valentina Studio, Sequel Pro e.t.c

This guide will walk you through how to install the Mysql Workbench on CentOS 7 / RHEL 7 / Amazon Linux 7. Mysql Workbench is a graphical database management tool widely used by database managers for the administration, development, and data modeling of the MySQL database. It succeeds the DBDesigner 4 from fabFORCE.net and replaces the MySQL GUI Tools Bundle package. This tool is fascinating with the fact that it supports database design through an EER diagram which in turn generates SQL scripts.

Some other cool features associated with Mysql Workbench are:

  • Database Connection & Instance Management
  • Supports custom plugins
  • Schema object browsing, inspection, and search
  • Supports SSH connection tunneling
  • It provides native support to Microsoft SQL Server, PostgreSQL, SQL Anywhere, SQLite, and Sybase ASE
  • It has the MSAA (Windows Accessibility API) compliant
  • Wizard driven action items
  • Reverse engineering from SQL Scripts and live database as well as forward engineering to SQL Scripts and live database
  • Supports database migration to any ODBC compliant database
  • Fully scriptable with Python and Lua
  • Supports MySQL Enterprise features (Audit Log, Firewall, and Enterprise Backup)
  • Visual EXPLAIN
  • Performance monitoring through Performance Schema metrics, Query statistics, MySQL instance dashboard e.t.c
  • Unicode support

Before You Begin.

Before we plunge in, ensure that your system and all the available packages are updated to their latest available versions.

sudo yum update

Also, ensure that you have MySQL installed. This installation can be done on a remote or local host.

Below are guides that will help you achieve this:

Now let’s dive in and enjoy the awesomeness of this tool!

1. Install Mysql Workbench on CentOS 7 / RHEL 7 / Amazon Linux 7

Instaling Mysql Workbench on CentOS 7 / RHEL 7 / Amazon Linux 7 can be done in several ways. This guide covers the two methods below:

  • Using the YUM repository.
  • Using snap

Option 1 – Install Mysql Workbench on CentOS 7 / RHEL 7 / Amazon Linux 7 using the YUM repository.

We will begin by adding the official MySQL Yum Repository obtained from the MySQL downloads page. On this page, we will download the MySQL community RPM package.

Alternatively, you can pull the repository as shown:

wget https://repo.mysql.com/mysql80-community-release-el7-1.noarch.rpm

Install the repository using the command:

sudo rpm -Uvh  mysql80-community-release-*

Sample execution output:

warning: mysql80-community-release-el7-1.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:mysql80-community-release-el7-1  ################################# [100%]

Now using the added repository, install MySQL Workbench using the command:

sudo yum install mysql-workbench

Dependency Tree:

Transaction Summary
============================================================================================================================================
Install  1 Package (+89 Dependent packages)

Total download size: 73 M
Installed size: 296 M
Is this ok [y/d/N]: y

Option 2 – Install Mysql Workbench on CentOS 7 / RHEL 7 / Amazon Linux 7 using Snap.

You can also install the Mysql Workbench on CentOS 7 / RHEL 7 / Amazon Linux 7 using Snap. First, install snap on your system.

sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum install snapd

Start and enable the snap service

sudo systemctl enable --now snapd.socket

To enable classic snap support, create the symbolic link as shown.

sudo ln -s /var/lib/snapd/snap /snap

Install MySQL Workbench Community using Snap with the command:

$ sudo snap install mysql-workbench-community
2022-06-04T04:31:31-04:00 INFO Waiting for automatic snapd restart...
mysql-workbench-community 8.0.25 from Tonin Bolzan (tonybolzan) installed

2. Manage MySQL database using Mysql Workbench

Once installed, you can easily manage your MySQL database running on both local and remote hosts.

Start Mysql Workbench using the command:

mysql-workbench

You can also launch it from the App Menu.

Install-Mysql-Workbench-on-CentOS-7-RHEL-7Amazon-Linux

It will then initialize with the below page:

Install-Mysql-Workbench-on-CentOS-7-RHEL-7Amazon-Linux-1

Now connect to your running MySQL database by clicking on +. Provide the database details.

Install-Mysql-Workbench-on-CentOS-7-RHEL-7Amazon-Linux-2

You can now test the connection by providing the password.

Install-Mysql-Workbench-on-CentOS-7-RHEL-7Amazon-Linux-3

The created connection will appear on the home page:

Install-Mysql-Workbench-on-CentOS-7-RHEL-7Amazon-Linux-4

Click on the instance to connect. Once authenticated, you will see the admin dashboard below.

Install-Mysql-Workbench-on-CentOS-7-RHEL-7Amazon-Linux-5

Verify the connection status.

Install-Mysql-Workbench-on-CentOS-7-RHEL-7Amazon-Linux-6

Manage users in the User and Privileges tab.

Install-Mysql-Workbench-on-CentOS-7-RHEL-7Amazon-Linux-7

You can also switch to the schemas tab.

Install-Mysql-Workbench-on-CentOS-7-RHEL-7Amazon-Linux-8

Here, you can create databases, and tables, and import data into them e.t.c. To create a new schema, proceed as below.

Install-Mysql-Workbench-on-CentOS-7-RHEL-7Amazon-Linux-9

The end!
That was enough learning. You can now use the installed Mysql Workbench to easily manage your MySQL databases. I hope this was helpful.

Gravatar Image
A systems engineer with excellent skills in systems administration, cloud computing, systems deployment, virtualization, containers, and a certified ethical hacker.