Saturday, December 28, 2024
Google search engine
HomeData Modelling & AIInstall MySQL Workbench on CentOS 8|Rocky Linux 8|AlmaLinux 8

Install MySQL Workbench on CentOS 8|Rocky Linux 8|AlmaLinux 8

Not everyone will enjoy management of a database server from the command line interface. As a developer you need a faster way to move from development to Production, with less hassle and sometimes command line interfaces is not an option. One of the mostly used tools for database management – creating databases, users, starting and stopping services, importing and exporting databases is MySQL Workbench. In this short tutorial I’ll show you the steps you need to follow to install and start using MySQL Workbench on CentOS 8|Rocky Linux 8|AlmaLinux 8 Workstation.

MySQL Workbench is a graphical user interface tool created by MySQL development team behind the powerful MySQL RDMS. This tools is created for both Developers and Database administrators. It is a handy tool for general administration and maintenance of MySQL database systems. It can also be used for MariaDB databases – fork of MySQL. Before you begin installation, it is worth taking note of available MySQL Workbench editions.

  • MySQL Workbench Community Edition
  • MySQL Workbench Standard Edition
  • MySQL Workbench Enterprise Edition

It is recommended you review your business requirements, team size before choosing an edition to go with. As this guide is created for home users, we’ll be helping you with the installation of the MySQL Workbench Community Edition in your Linux Desktop. I expect you to have a working CentOS 8|Rocky Linux 8|AlmaLinux 8 OS with graphical interface as this tool is for Desktop and not Server operating systems. It could be possible to run it through an SSH X session but this has not been tested.

Some key features that you’ll get from MySQL Workbench Community Edition are:

  • User and Session Management: Manage application roles, users and sessions from graphical interface.
  • Visual SQL Development: You’ll get SQL Code Editor, Completion, Formatter, Syntax Highlighting, Code Generation, Snippets, and use of history.
  • Data Management: Import and export, Quickly locate hard to find rows or cells and table Data Search.
  • Visual Database Administration: You’ll be able to Stop/Start servers locally and remotely, View key server diagnostic information, View and parse slow and error logs, view and edit server settings, View and edit MySQL Replication settings.
  • Connection Management: Configure connections to MySQL Servers and Configure SSH connections to local and remote servers.
  • Visual Data Modeling: Auto Layout, Model Stored Procedures, Triggers, Functions, Model User Security and Auto Layout.
  • Schema Synchronization
  • Reverse Engineering from SQL Script and from Live Database.

Install MySQL Workbench on CentOS 8|Rocky Linux 8|AlmaLinux 8

The next sections will demonstrate step-by-step installation of MySQL Workbench on your Desktop machine. If you have not done a recent update of your operating system I’ll recommend you fire commands below in your terminal to make sure you’re rolling on latest OS updates.

sudo dnf -y update

Add MySQL Repository to CentOS 8|Rocky Linux 8|AlmaLinux 8

Wait for the system to be started if you performed an upgrade as guided in previous step. Once the system comes up, add MySQL YUM repository which is officially created and maintained by MySQL development team.

You can download the repository installation rpm file and run it locally or install from the URL with dnf command. I prefer the latter for ease of use.

sudo dnf -y install https://dev.mysql.com/get/mysql80-community-release-el8-4.noarch.rpm

RPM package details can be viewed with the rpm command line tool.

$ rpm -qi mysql80-community-release
Name        : mysql80-community-release
Version     : el8
Release     : 4
Architecture: noarch
Install Date: Fri Jun  3 12:01:40 2022
Group       : System Environment/Base
Size        : 8853
License     : GPLv2
Signature   : RSA/SHA256, Wed Apr 27 23:00:35 2022, Key ID 467b942d3a79bd29
Source RPM  : mysql80-community-release-el8-4.src.rpm
Build Date  : Wed Apr 27 22:56:43 2022
Build Host  : pb2-el8-01.regionaliad02.mysql2iad.oraclevcn.com
Relocations : (not relocatable)
Packager    : MySQL Release Engineering <[email protected]>
Vendor      : MySQL
URL         : http://dev.mysql.com
Summary     : MySQL repository configuration for yum
Description :
Package for installation of setup/configuration files required for
installation of MySQL packages by yum.

If you check repository files directly you should see a new file written by the installer package.

$ ls /etc/yum.repos.d/mysql-community*
/etc/yum.repos.d/mysql-community-debuginfo.repo  /etc/yum.repos.d/mysql-community-source.repo  /etc/yum.repos.d/mysql-community.repo

Install MySQL Workbench on CentOS 8|Rocky Linux 8|AlmaLinux 8

The repository for MySQL is enabled by default and no further action is required before using it.

$ cat  /etc/yum.repos.d/mysql-community.repo 
[mysql80-community]
name=MySQL 8.0 Community Server
baseurl=http://repo.mysql.com/yum/mysql-8.0-community/el/8/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022
       file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

[mysql-connectors-community]
name=MySQL Connectors Community
baseurl=http://repo.mysql.com/yum/mysql-connectors-community/el/8/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022
       file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

[mysql-tools-community]
name=MySQL Tools Community
baseurl=http://repo.mysql.com/yum/mysql-tools-community/el/8/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022
       file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

[mysql-tools-preview]
name=MySQL Tools Preview
baseurl=http://repo.mysql.com/yum/mysql-tools-preview/el/8/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022
       file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

[mysql-cluster-8.0-community]
name=MySQL Cluster 8.0 Community
baseurl=http://repo.mysql.com/yum/mysql-cluster-8.0-community/el/8/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022
       file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

Update YUM package index.

$ sudo dnf makecache timer 
CentOS-8 - AppStream                                                                                                                                                 2.2 kB/s | 4.3 kB     00:01    
CentOS-8 - Base                                                                                                                                                      8.6 kB/s | 3.9 kB     00:00    
CentOS-8 - Extras                                                                                                                                                    2.2 kB/s | 1.5 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64                                                                                                                30 kB/s |  61 kB     00:02    
Extra Packages for Enterprise Linux 8 - x86_64                                                                                                                        39 kB/s |  61 kB     00:01    
MySQL 8.0 Community Server                                                                                                                                           350 kB/s | 919 kB     00:02    
MySQL Connectors Community                                                                                                                                            19 kB/s |  33 kB     00:01    
MySQL Tools Community                                                                                                                                                 91 kB/s | 109 kB     00:01    
Metadata cache created.

You can then run the command to install MySQL Workbench tool on CentOS 8|Rocky Linux 8|AlmaLinux 8:

sudo dnf install mysql-workbench-community

On executing the command above you’ll be asked to confirm package installation by pressing y or Y key.

....
Transaction Summary
======================================================================================================================================================================================================
Install  51 Packages

Total download size: 87 M
Installed size: 360 M
Is this ok [y/N]: y

The package to be downloaded is around 33M and this should be quick if you have moderate speed internet connection.

Make sure you import GPG key during installation. If you happen to hit the n key installation will be aborted.

....
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                  35 MB/s |  87 MB     00:02
MySQL Tools Community                                                                                                                                                 3.0 MB/s | 3.1 kB     00:00
Importing GPG key 0x3A79BD29:
 Userid     : "MySQL Release Engineering <[email protected]>"
 Fingerprint: 859B E8D7 C586 F538 430B 19C2 467B 942D 3A79 BD29
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022
Is this ok [y/N]: y
Key imported successfully
MySQL Tools Community                                                                                                                                                 1.9 MB/s | 1.9 kB     00:00
Importing GPG key 0x5072E1F5:
 Userid     : "MySQL Release Engineering <[email protected]>"
 Fingerprint: A4A9 4068 76FC BD3C 4567 70C8 8C71 8D3B 5072 E1F5
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
Is this ok [y/N]: y

Using MySQL Workbench on CentOS 8|Rocky Linux 8|AlmaLinux 8

Once installation is confirmed to have finished without errors MySQL Workbench application can be launched from DE launcher by typing “MySQL” keyword and selecting from the list.

install mysql workbench centos 08 01

You’ll get welcome page for MySQL Workbench. This confirms installation was successful and application can run.

install mysql workbench centos 08 02

Click on Database > Connect to Database to create first connection to a database server.

install mysql workbench centos 08 03

Provide Database server hostname or IP, port number and password for connection. Use “Store in Keychain” for password.

install mysql workbench centos 08 04

Confirm the connection is working by clicking on “Server Status” to check server details.

install mysql workbench centos 08 05

You have MySQL Workbench installed and working on CentOS 8|Rocky Linux 8|AlmaLinux 8 Desktop machine. The next stage is to go through documentation pages to understand how MySQL Workbench works and how you can use it for faster development. You can also check below MySQL course to up your skills on Database administration.

Best Udemy Video Courses to Learn MySQL / MariaDB Databases:

For installation on Ubuntu use below link.

RELATED ARTICLES

Most Popular

Recent Comments