How to Install MySQL Workbench on Ubuntu

Take Your Linux Skills to the Next Level All courses, certifications, ad-free articles & community — from $8/mo
Join Root →
Ad-free access to all premium articles
Access to all courses: Learn Linux, AI for Linux, Bash Scripting, Ubuntu Handbook, Golang and more.
Access to Linux certifications (RHCSA, RHCE, LFCS and LFCA)
Access new courses on release
Get access to weekly newsletter
Priority help in comments
Private Telegram community
Connect with the Linux community
From $8/mo · or $59/yr billed annually · Cancel anytime

MySQL Workbench is a powerful visual tool for database management, development, and administration. It provides a graphical interface for working with MySQL databases, allowing users to easily design, create, and maintain databases.

In this article, we’ll guide you through the process of installing and using MySQL Workbench on Ubuntu.

Installing MySQL Server on Ubuntu

First, start by updating the system’s package repositories to ensure you have the latest software versions available.

sudo apt update

Next, we’ll install the MySQL server, which is one of the most popular open-source relational database management systems (RDBMS) used worldwide.

sudo apt install mysql-server

After the installation is complete, it’s a good idea to run the mysql_secure_installation script to further secure your MySQL server.

This script will guide you through several security-related tasks, such as setting the root password, removing anonymous user accounts, disabling remote root login, and removing the test database.

sudo mysql_secure_installation

Follow the prompts and answer the questions as needed. For example, you may be asked to set the root password, remove anonymous users, disallow remote root login, and remove the test database.

Installing MySQL Workbench on Ubuntu

Now that the MySQL server is installed and configured, we can proceed with installing MySQL Workbench by downloading official DEB package from the MySQL website.

Alternatively, you can use the following wget command to download the latest version. At the time of writing, the latest version is 8.0.38, make sure to replace the version number with the latest one available if it has been updated.

wget https://cdn.mysql.com//Downloads/MySQLGUITools/mysql-workbench-community_8.0.38-1ubuntu24.04_amd64.deb

Once the download is complete, navigate to the directory where the file is downloaded and use the dpkg command to install it.

sudo dpkg -i mysql-workbench-community_8.0.38-1ubuntu24.04_amd64.deb

If the installation fails due to missing dependencies, you can use the following command to install the missing dependencies and complete the MySQL Workbench installation.

sudo apt -f install

Alternatively, you can also install MySQL Workbench using the Ubuntu package repositories. However, the version available in the repositories may be older than the one available on the MySQL website.

To install from the repositories, you can use the following command:

sudo apt install mysql-workbench-community

Launch MySQL Workbench in Ubuntu

After the installation is complete, you can launch MySQL Workbench using the following command.

mysql-workbench

When you launch MySQL Workbench for the first time, it may prompt you to configure a connection to the MySQL server. If so, follow the on-screen instructions to set up a new connection.

Click on the "+" icon in the “MySQL Connections” section of the home screen, fill in the connection details, such as the hostname (or IP address), username, and password and test the connection to ensure it’s working correctly.

Create New Database Connection
Create New Database Connection

Uninstalling MySQL and MySQL Workbench

If you need to remove MySQL and MySQL Workbench from your Ubuntu system, follow these commands.

sudo systemctl stop mysql
sudo apt remove mysql-workbench-community
sudo apt remove mysql-server
sudo apt autoremove

This will completely remove MySQL and MySQL Workbench from your Ubuntu system.

Conclusion

In this article, we’ve covered the step-by-step process of installing MySQL and MySQL Workbench on an Ubuntu system using the official DEB packages provided by MySQL.

We’ve also discussed how to configure and use MySQL Workbench to manage your MySQL databases, as well as how to uninstall both MySQL and MySQL Workbench if needed.

Root Plan
Premium Linux Education for Serious Learners

Take Your Linux Skills to the Next Level

Root members get full access to every course, certification prep track, and a growing library of hands-on Linux content — with new courses added every month.

What You Get
Ad-free access to all premium articles
Access to all courses: Learn Linux, AI for Linux, Bash Scripting, Ubuntu Handbook, Golang and more.
Access to Linux certifications (RHCSA, RHCE, LFCS and LFCA)
Access new courses on release
Get access to weekly newsletter
Priority help in comments
Private Telegram community
Connect with the Linux community
Ravi Saive
I'm Ravi Saive, an award-winning entrepreneur and founder of several successful 5-figure online businesses, including TecMint.com, GeeksMint.com, UbuntuMint.com, and the premium learning hub Pro.Tecmint.com.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

Got Something to Say? Join the Discussion...

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.

Root Plan Premium Linux Education for Serious Learners

Before You Go - Upgrade Your Linux Skills

Root members get everything in one place, with new courses added every month.

What You Get
Ad-free access to all premium articles
Access to all courses: Learn Linux, AI for Linux, Bash Scripting, Ubuntu Handbook, Golang and more.
Linux certifications: RHCSA, RHCE, LFCS and LFCA
Access new courses on release
Weekly newsletter, priority support & Telegram community
Join Root Today and Start Learning Linux the Right Way
Structured courses, certification prep, and a community of Linux professionals - all in one membership.
Join Root Plan →
$8/mo · or $59/yr billed annually