Databases

Install MySQL Workbench on Rocky Linux 10 / AlmaLinux 10

MySQL Workbench is a graphical database management tool developed by Oracle for MySQL server administration, SQL development, data modeling, and database migration. It gives developers and DBAs a visual interface to manage connections, write and execute queries, design EER diagrams, and handle data import/export – all without the command line.

Original content from computingforgeeks.com - post 65416

This guide covers installing MySQL Workbench on Rocky Linux 10 and AlmaLinux 10. Since Oracle does not yet provide an official EL10 RPM package for MySQL Workbench 8.0.46 (the latest release as of March 2026), we cover two working installation methods: using the EL9 RPM from the MySQL official downloads page, and using the Snap package. We also cover connecting to MySQL and MariaDB servers, creating databases and tables, running queries, exporting data, and building EER diagrams.

Prerequisites

  • Rocky Linux 10 or AlmaLinux 10 with a graphical desktop environment (GNOME)
  • Root or sudo access
  • Active internet connection
  • A running MySQL 8.4 or MariaDB 11.4 server (local or remote) for testing connections

Step 1: Update System Packages

Start by updating all packages on your Rocky Linux 10 or AlmaLinux 10 system to ensure you have the latest security patches and dependencies.

sudo dnf update -y

Step 2: Install MySQL Workbench on Rocky Linux 10 / AlmaLinux 10

There are two reliable methods to install MySQL Workbench on EL10 systems. Choose the one that fits your workflow.

Method 1: Install from MySQL Yum Repository (EL9 RPM)

Oracle provides MySQL Workbench RPMs for EL9 but not EL10 yet. The EL9 package works on Rocky Linux 10 / AlmaLinux 10 because the core library versions (glibc, GTK, etc.) are compatible. First, install the MySQL Yum repository.

sudo dnf install -y https://dev.mysql.com/get/mysql84-community-release-el9-1.noarch.rpm

Install the required dependencies and MySQL Workbench community edition.

sudo dnf install -y mysql-workbench-community

If the installation reports dependency conflicts, install these packages first.

sudo dnf install -y mesa-libGL gtk3 python3 python3-paramiko libsecret libzip proj pcre2-utf16

Then retry the MySQL Workbench install.

Verify the installation by checking the version.

mysql-workbench --version

The output should show the installed MySQL Workbench version.

MySQL Workbench CE (GPL) version 8.0.46 CE build xxx

Method 2: Install MySQL Workbench via Snap

Snap packages bundle all dependencies, making them a reliable option when native RPMs are not available for your OS version. Install snapd first.

sudo dnf install -y epel-release
sudo dnf install -y snapd
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap

Log out and log back in, or reboot, so the snap paths take effect. Then install MySQL Workbench.

sudo snap install mysql-workbench-community

Verify the snap installation.

snap list mysql-workbench-community

You should see the package name, version, and channel listed.

Step 3: Launch MySQL Workbench

Launch MySQL Workbench from the GNOME Activities menu by searching for “MySQL Workbench”, or run it from the terminal.

mysql-workbench

The Workbench home screen opens, showing the connection manager and recent connections panel.

Step 4: Connect to a MySQL or MariaDB Server

Click the + icon next to “MySQL Connections” on the home screen to create a new connection.

Fill in the connection details:

  • Connection Name: a descriptive label (e.g., “Local MySQL 8.4”)
  • Hostname: 127.0.0.1 for local or the remote server IP
  • Port: 3306 (default MySQL/MariaDB port)
  • Username: root or your database user
  • Password: click “Store in Keychain” and enter the password

Click Test Connection to verify connectivity. A success dialog confirms the connection is working. Click OK to save.

Connecting to a Remote Server via SSH Tunnel

For remote MySQL servers behind a firewall, use the SSH tunnel method. In the connection dialog, switch the Connection Method to “Standard TCP/IP over SSH” and fill in:

  • SSH Hostname: the remote server IP or domain (e.g., 10.0.1.50)
  • SSH Username: your SSH user
  • SSH Key File: path to your private key (or use password)
  • MySQL Hostname: 127.0.0.1
  • MySQL Server Port: 3306

Make sure port 22 (SSH) is open on the remote server. The MySQL port does not need to be exposed externally since the connection tunnels through SSH.

Step 5: Create a Database and Tables in MySQL Workbench

After connecting, you can create databases and tables using the visual interface or SQL queries.

Create a Database Using the GUI

  • Click the Create Schema icon (cylinder with a + sign) in the toolbar
  • Enter the schema name (e.g., myapp_db)
  • Set the character set to utf8mb4 and collation to utf8mb4_unicode_ci
  • Click Apply, review the generated SQL, then click Apply again

Create a Database Using SQL

Open a new SQL tab by clicking File > New Query Tab or pressing Ctrl+T, then run:

CREATE DATABASE myapp_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
USE myapp_db;

Create Tables Visually

Expand the myapp_db schema in the left Navigator panel. Right-click Tables and select Create Table. Add columns using the table editor:

  • id – INT, Primary Key, Auto Increment
  • name – VARCHAR(100), NOT NULL
  • email – VARCHAR(255), UNIQUE
  • created_at – DATETIME, Default: CURRENT_TIMESTAMP

Click Apply to review and execute the CREATE TABLE statement.

You can also create tables with SQL directly.

CREATE TABLE users (
    id INT AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(100) NOT NULL,
    email VARCHAR(255) UNIQUE,
    created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE orders (
    id INT AUTO_INCREMENT PRIMARY KEY,
    user_id INT NOT NULL,
    product VARCHAR(200) NOT NULL,
    amount DECIMAL(10,2),
    order_date DATE,
    FOREIGN KEY (user_id) REFERENCES users(id)
);

Step 6: Run SQL Queries

MySQL Workbench provides a SQL editor with syntax highlighting, auto-completion, and query history. Open a query tab and insert some sample data.

INSERT INTO users (name, email) VALUES
('Alice Johnson', '[email protected]'),
('Bob Smith', '[email protected]'),
('Carol White', '[email protected]');

INSERT INTO orders (user_id, product, amount, order_date) VALUES
(1, 'Server Rack', 2500.00, '2026-03-01'),
(2, 'Network Switch', 850.00, '2026-03-05'),
(1, 'UPS Battery', 420.00, '2026-03-10');

Run a JOIN query to verify the data.

SELECT u.name, o.product, o.amount, o.order_date
FROM users u
JOIN orders o ON u.id = o.user_id
ORDER BY o.order_date;

Click the lightning bolt icon (or press Ctrl+Shift+Enter) to execute all statements, or Ctrl+Enter to run only the statement under the cursor. Results appear in the output panel below the editor.

Step 7: Export and Import Data

Export a Database

Go to Server > Data Export in the menu. Select the databases and tables to export. Choose the export format:

  • Export to Dump Project Folder – creates individual SQL files per table (best for version control)
  • Export to Self-Contained File – single SQL dump file (best for backups and transfers)

Click Start Export. The progress bar shows each table being dumped.

Import Data

Go to Server > Data Import. Select the import source:

  • Import from Dump Project Folder – select the folder containing SQL files
  • Import from Self-Contained File – select the .sql dump file

Choose the target schema or create a new one, then click Start Import. You can also import CSV data by right-clicking a table and selecting Table Data Import Wizard.

Step 8: Create EER Diagrams

Enhanced Entity-Relationship (EER) diagrams give you a visual map of your database schema, showing tables, columns, and relationships.

Generate EER Diagram from Existing Database

Go to Database > Reverse Engineer. Select your connection and click Next. Choose the schema (e.g., myapp_db) and proceed through the wizard. Workbench generates the EER diagram with all tables and foreign key relationships drawn automatically.

You can rearrange tables by dragging them, add notes, and customize the diagram layout. To export the diagram as an image, go to File > Export > Export as PNG.

Create a New EER Model

Go to File > New Model to start a blank EER diagram. Double-click “Add Diagram” to open the canvas. Use the table tool to add tables, define columns, and draw relationships between them. When the design is ready, use Database > Forward Engineer to generate and execute the SQL on your server.

Alternative: DBeaver Community Edition

If you need a database management tool with native EL10 support and broader database compatibility (PostgreSQL, MariaDB, SQLite, Oracle, MongoDB, and more), DBeaver Community Edition is a strong alternative. It is available as an RPM, Flatpak, and Snap package, and supports Rocky Linux 10 / AlmaLinux 10 directly.

sudo dnf install -y java-21-openjdk
sudo rpm -i https://dbeaver.io/files/dbeaver-ce-latest-stable.x86_64.rpm

DBeaver provides an ER diagram viewer, SQL editor with auto-completion, data export in CSV/JSON/XML formats, and a visual query builder. For teams working with multiple database engines, it is often the better choice.

Firewall Configuration for Remote Connections

If your MySQL or MariaDB server is on a different machine, make sure the firewall allows connections on port 3306/TCP.

On the database server, run:

sudo firewall-cmd --permanent --add-port=3306/tcp
sudo firewall-cmd --reload

Verify the port is open.

sudo firewall-cmd --list-ports

The output should include 3306/tcp in the list. Also confirm MySQL/MariaDB is listening on all interfaces (not just localhost) by checking the bind-address directive in your database configuration. For a guide on installing and configuring PostgreSQL on Rocky Linux 10, we have a separate article covering remote access setup.

Troubleshooting Common Issues

Cannot connect to MySQL server – verify the MySQL/MariaDB service is running with systemctl status mysqld or systemctl status mariadb. Check that the user has remote access grants if connecting from a different host.

Authentication plugin error – MySQL 8.4 uses caching_sha2_password by default. If using an older Workbench version, you may need to switch the user to mysql_native_password. With MySQL Workbench 8.0.46, this should not be an issue as it supports both plugins.

Missing libraries on EL10 – if the EL9 RPM reports missing shared libraries, install the compatibility packages:

sudo dnf install -y compat-openssl11 libssh

Snap version cannot access local MySQL socket – Snap applications run in a sandbox. Connect via TCP (127.0.0.1:3306) instead of the Unix socket. If your MySQL Workbench was installed using the Fedora RPM method, socket connections work without restrictions.

Conclusion

MySQL Workbench is installed and running on Rocky Linux 10 / AlmaLinux 10 using either the MySQL Yum repository (EL9 RPM) or Snap. You can now manage MySQL and MariaDB databases visually – creating schemas, writing queries, exporting data, and building EER diagrams from the desktop.

For production environments, consider setting up TLS/SSL encryption for MySQL connections and configuring role-based access control to limit database user permissions. Regular backups via the Data Export feature or command-line mysqldump should be part of your maintenance routine.

Related Articles

CentOS Install oVirt Compute Node on CentOS Stream 9 / Rocky 9 AlmaLinux Configure iSCSI Target and Initiator on Rocky Linux 8|AlmaLinux 8 CentOS Install Jellyfin Media Server on CentOS 8|Rocky Linux 8 Databases How To Install PostgreSQL 17 on Kali Linux 2025.x

Leave a Comment

Press ESC to close