How to Install and Use MySQL Workbench on Ubuntu 22.04


MySQL Workbench is an open-source, user-friendly Graphical User Interface (GUI) application provided by Oracle Corporation. It offers a wide range of tools/features that help users efficiently manage MySQL databases. These tools can be utilized by database administrators, architects, and developers to visualize and work with MySQL database designs.

This write-up demonstrates a step-by-step guide on installing and using the MySQL Workbench on Ubuntu 22.04.

How to Install and Configure MySQL Workbench on Ubuntu 22.04 LTS?

Check out the following step-by-step instructions to successfully install and use MySQL Workbench on Ubuntu 22.04 LTS.

Step 1: Perform System Update

To initiate the system update, open the Terminal by pressing the keyboard shortcut “CTRL + ALT + T“, and proceed by running the following command:

sudo apt update

Step 2: Install MySQL Server

MySQL Workbench is a user-friendly graphical application that helps us manage MySQL servers. To utilize this tool without any hassles, MySQL server must be installed (prerequisite) on your Ubuntu machine. To do that, simply execute the below-given “sudo” command in the terminal:

sudo apt-get install mysql-server -y

The MySQL installation will take a while to finish. Once it’s done, you will see the cursor move to the next line without any errors:

Step 3: Confirm MySQL Service Status

Run the provided command to verify if the MySQL service is activated or not:

systemctl is-active mysql

The below screenshot demonstrates that the MySQL service is in active state:

Step 4: Configure MySQL Server

Now, use the below-provided “sudo” command to configure the MySQL server:

sudo mysql_secure_installation

Upon doing so, you will be navigated to the below-given screen. Enter the new password for the “root” user and press “y” to proceed with the provided password:

If everything proceeds smoothly, you will see the following output:

The above output confirms that MySQL Server has been successfully configured.

Step 5: Install MySQL Workbench

Now, we are all set to proceed with the MySQL Workbench installation on Ubuntu 22.04. To initiate the installation process, execute the below-provided command:

sudo snap install mysql-workbench-community

The below-stated output confirms that MySQL Workbench has been successfully installed on Ubuntu 22.04:

How to Use MySQL Workbench on Ubuntu 22.04 LTS?

Now, click on the “Show Apps” icon, search for the “MySQL Workbench” in the search menu, and click on the desired app to launch it:

Upon doing so, you will be navigated to the following window:

Provide the connection name and hit the “OK” button to setup a new connection:

Now click on the newly created connection to establish a connection with MySQL Server:

Specify a valid root user password and hit the “OK” button to proceed further:

Upon doing so, a new query window/tool will open where users can execute any MySQL command, function, etc. For instance, in the below snippet, the VERSION() function checks the MySQL’s installed version:

That’s all about installing and using MySQL Workbench on Ubuntu 22.04 LTS.

Conclusion

To install MySQL Workbench on Ubuntu 22.04 LTS, first, install MySQL server, confirm MySQL service status, configure the MySQL server, and then install the MySQL Workbench by executing the “sudo snap install mysql-workbench-community” command. Users can verify the MySQL installed version by executing the “SELECT VERSION()” command. This article has demonstrated a complete process of installing and using MySQL Workbench on Ubuntu 22.04 LTS.

 

Print Friendly, PDF & Email
Categories