3 Ways to Install MySQL Workbench on Ubuntu 22.04 LTS Linux
Get the steps to install MySQL Workbench on Ubuntu 22.04 LTS Linux Jammy JellyFish to graphically manage MySQL or MariaDB databases.
What is MySQL Workbench?
MySQL Workbench is a graphical user interface developed to offer an easy-to-use graphical interface and collection of tools for managing and working with MySQL databases. The system makes it possible to design and edit databases, to present them clearly and to administer them.
It provides extensive functions for daily work with databases and can be used to design, create, edit, administer and display databases. The software is able to extract existing database structures and reproduce them clearly.
Different editions of MySQL Workbench?
MySQL Workbench is available in a community edition and an enterprise edition. Well, as always, the Community Edition is available under the GPL license and is available for free. The Enterprise Edition is a paid commercial version of the software with more advanced features.
Key Features and Capabilities
MySQL Workbench provides many features for working with MySQL databases and offers many ways to use them.
⇒ Database design and modeling
⇒ Develop, create and optimize databases
⇒ Database administration
⇒ Documentation of databases
⇒ Database performance monitoring and optimization
⇒ Database Migration – Native support for Microsoft SQL Server, PostgreSQL, SQL Anywhere, SQLite and Sybase ASE
⇒ Reverse engineering of databases
⇒ Backup and restore
Steps to Install MySQL Workbench on Ubuntu 22.04 Linux
We can install Workbench on Ubuntu either by using the MySQL repository or directly by installing its Debian binary. Here we will show how to use both. Apart from them, SNAP is another method to install this tool.
#1st method using SNAP:
1. Use Snap to install Workbench
Well, most modern Ubuntu systems, including 22.04 Jammy JellyFish, come with a SNAP package manager. It is a universal package manager that works on most popular Linux distributions, regardless of their code base.
sudo snap install mysql-workbench-community
Also run the given command to allow the SNAP to access the workbench password manager feature.
sudo snap connect mysql-workbench-community:password-manager-service :password-manager-service
If you don’t run the above command while connecting the database in Workbench, you will get an error:
Your connection attempt failed for user ‘root’ to the MySQL server at localhost:3306:
An AppArmor policy prevents this sender from sending this message to this recipient; type=”method_call”, sender=”:1.125″ (uid=1000 pid=7944 comm=”/snap/mysql-workbench-community/5/usr/bin/mysql-wo” label=”snap.mysql-workbench- community.mysql-workbench-community (enforce)”)
#2nd method using the Debian binary:
2. Download MySQL WorkBench
Although the MySQL database can be installed directly using the standard Ubuntu repository, the same cannot be said for the Workbench. It is not available in the system default repository, so we either have to add its repository or manually download the executable binary for Debian Linux. In this step we will show you how to use the binary.
For that, visit the official Workbench download page first. There, select the operating system – Ubuntu in the drop-down list and Click on on the first edition to download.
To note: The second package “mysql-workbench-community-dbgsym” is for those who want tables of symbols that a debugger would need to make sense of a core dump if the application encounters a drastic error. Whereas in the standard version symbol names are removed to save some space.
3. Open the command terminal
Now open the command terminal on your Ubuntu 22.04 LTS. You can use the keyboard shortcut for this: Ctrl+Alt+T. Once opened, proceed to Downloads phone book. This is because the files we download using the browser go there by default.
4. Install MySQL Workbench on Ubuntu 22.04
Now we have an executable Debian binary of Workbench that can be installed easily using the DPKG tool, so let’s do that.
sudo dpkg -i mysql-workbench-community*.deb
#3rd method using MySQL repository:
5. Add MySQL Repository
Well, in the first method to get the latest updated version of Workbench, we have to manually download and install its latest binary. However, those who want to use the APT package manager can add the MySQL repository. The repository will provide Workbench packages until the next Ubuntu LTS release is released. So, download an available Debian binary for that.
Add the repository:
sudo dpkg -i mysql-apt-config_0.8.23-1_all.deb
Use the arrow key, select OK and press the Enter key.
Add the key to the trust:
sudo apt-key export 3A798D29 | sudo gpg --dearmour -o /etc/apt/trusted.gpg.d/mysql-key.gpg
5. Run Ubuntu 22.04 Update
After adding the repository once more, run the system update command using APT.
sudo apt update && sudo apt upgrade
6. Get MySQL Workbench using APT
Now we can easily use the APT package manager to install the community edition of MySQL Workbench. Here is the command to follow:
sudo apt install mysql-workbench-community
8. Launch the MySQL GUI
Go to the application launcher and there in the search field type MYSQL, soon you will see its icon to launch. Click on the same to start the application.
9. Connect to the database
Click on the Database so what Connect to database option. Alternatively, we can use the keyboard shortcut Ctrl+U.
Walk in the details of the remote database you want to manage, such as the database IP address and username. For the local MySQL server, you can leave the defaults as they are. Click on the Ok button and soon it will ask you for the database password to login.
After successfully logging in, here is the interface:
Remove or uninstall
Well, maybe after a while you won’t need Workbench on your system anymore if that’s the case. Then here are the commands to remove it.
For the DPKG and APT method
sudo apt remove mysql-workbench-community --purge
sudo snap remove mysql-workbench-community
⇒ Install MongoDB 6.0 Server on Debian 11 Bullseye
⇒ Install PostgreSQL pgAdmin 4 on Ubuntu 22.04 LTS
⇒ How to Install DaVinci Resolve on Ubuntu 22.0
⇒ Install Stremio Streaming app on Ubuntu 22.04 LTS
⇒ Install Akaunting on Ubuntu 22.04 or 20.04 LTS