Manjaro Linux

How to install MySQL Workbench on Manjaro Linux

MySQL Workbench is a multipurpose database management tool that integrates several SQL artifacts. It has a set of features to offer such as SQL development, data modeling, user administration, server configuration, database administration, and many more. The functionalities provided by MySQL Workbench are practiced by Database Administrators and MySQL developers of the organizations using MySQL database management.

MySQL Workbench offers cross-platform support and can be installed on various Linux distributions as well. In this post, a detailed guide is provided that addresses the following objectives:

– Installing MySQL Workbench on Manjaro

Using MySQL Workbench on Manjaro

How to install MySQL Workbench on Manjaro Linux

In this guide, several methods and their respective steps are provided that direct you to the installation of MySQL Workbench. There are two methods to get MySQL Workbench on Manjaro and are mentioned below:

– Using Graphical User Interface

– Using Command Line Interface

Both methods are described briefly in the upcoming sections.

Method 1: How to install MySQL Workbench using GUI on Manjaro Linux

To get MySQL workbench in Manjaro, you have to follow the steps mentioned below:

Step 1: Click on the “Show Applications” option on the desktop:

Step 2: Once the applications window is opened; click on “Add/Remove Software“.

A screenshot of a computer Description automatically generated with low confidence

Step 3: After that, navigate to the search icon on the top left corner of the window.

A screenshot of a computer Description automatically generated with medium confidence

Step 4: A search bar will be displayed in the center of the menu bar. Now, write “mysql-workbench” to look for packages. After that, you will get the “MySQL Workbench” package as shown in the image below.

Graphical user interface Description automatically generated

Step 5: After that, navigate to the install button, as soon as you click on the button it will turn to the “tick” mark and an “Apply” button will be displayed on the foot bar of the window. For further proceedings, click on “Apply“:

Graphical user interface, application, Teams Description automatically generated

Step 6: After clicking on “Apply“, an authentication prompt will appear. You must enter your password correctly to proceed further.

A screenshot of a computer Description automatically generated with medium confidence

Step 7: After that, you will be prompted with a window that contains the list of additional packages that are recommended to work with MySQL Workbench. To grant permission, click on “Apply“:

Graphical user interface, application Description automatically generated

After that, the installation process will start that may take several minutes.

Graphical user interface, application Description automatically generated

Once the installation is completed, the green button will turn to remove (red) button that shows the installation has successfully completed.

Graphical user interface, text, application Description automatically generated

To locate the installed package, click on “Show Applications” icon on the desktop and you will find the newly installed “MySQL Workbench” there:

Graphical user interface, application Description automatically generated

Method 2: How to install MySQL Workbench using terminal on Manjaro Linux

This method explains the MySQL Workbench installation using the terminal of Manjaro Linux. There are two ways to use command line support to get MySQL Workbench on Manjaro Linux.

  • Install MySQL Workbench using yay(AUR helper)
  • Installing MySQL Workbench using Pacman

Method A: Installing MySQL Workbench using yay(AUR helper)

The yay is the helper for AUR(Arch User Repository) and is used to install/uninstall packages. The below-mentioned command will install MySQL Workbench on Manjaro Linux:

$ yay -S mysql-workbench

Text Description automatically generated

You can verify the installation by executing the following command using terminal:

$ mysql-workbench

Text Description automatically generated

And the above command will start the MySQL Workbench application:

Graphical user interface, text, application Description automatically generated

Method B: Installing MySQL Workbench using Pacman

Pacman is a package manager of Manjaro Linux-like apt in Debian-based distributions. One can use Pacman to install MySQL workbench on Manjaro.

Step 1: Firstly, update the package’s database by issuing the below-stated command.

$ sudo pacman -Syu

Text Description automatically generated

Step 2: Once you have performed the updating, you can install MySQL Workbench with the help of the given command.

$ sudo pacman -S mysql-workbench

Text Description automatically generated

Or, if you use the “-Syu” flag to install the package, then pacman updates the database and installs the package in a single command. So, you can perform that multitask by issuing commands mentioned below.

$ sudo pacman -Syu mysql-workbench

Step 3 : To verify the installation, you can run MySQL workbench on your Manjaro system from the terminal by entering the following keywords.

$ mysql-workbench

Graphical user interface, text, application Description automatically generated

How to use MySQL-Workbench on Manjaro

This section contains the usage of MySQL Workbench on Manjaro, and the below-mentioned steps will lead you to uninterrupted connection and use of MySQL Workbench.

Step 1 : Create MySQL Connection

Open the MySQL Workbench and click on the “+” icon as shown below.

Graphical user interface, text, application, email Description automatically generated

After doing so, you would get a connection interface where you have to create a new connection as follows.

– Choose the connection method “Local Socket/Pipe

– Type a connection name, it can be any as per your wish. We have named it “linuxhint

– Insert the Socket/Pipe Path “/var/run/mysqld/mysqld.sock“. You can do it manually by copying the right path or navigating to three horizontal dots and searching for “/var/run/mysqld/mysqld.sock

After configuring, click on “OK” to proceed further.

Graphical user interface, text Description automatically generated

The time you click on “OK“, the connection will be created and you can run it.

Graphical user interface, text, application Description automatically generated

To run “linuxhint” connection, click on “linxuhint‘ and you would get the following interface.

Graphical user interface, text, application Description automatically generated

Step 2 : Check the server status

Now, you must check the SQL server status by navigating to “Server Status” on the left pane of the window:

Graphical user interface, text, application Description automatically generated

And you can see that the server is running.

Graphical user interface, website Description automatically generated

Step 3 : Add new Schema

Click on the add schema icon as shown below:

Graphical user interface, text, application Description automatically generated

Choose the schema name and click on “Apply“:

Graphical user interface, text Description automatically generated

The next prompt will show you the query to create SQL Schema, navigate to “Apply“.

Graphical user interface, text Description automatically generated

After successful application of the query, the Schema will be added, and click on “Close“.

Graphical user interface, text, application Description automatically generated

You can observe that the Schema is created with the name “linux“.

Graphical user interface, text, application Description automatically generated

Step 4 : Create Tables

As observed, the “Tables” option is there. Right click on the “Tables” and then navigate to “Create Table“.

Graphical user interface Description automatically generated

You would find the interface where you have to enter the “Table Name” and enter its field and then click on “Apply“.

Graphical user interface Description automatically generated

After successful creation, it will appear under the “linux” named database.

Graphical user interface, text, application Description automatically generated

To perform any operation on the table, MySQL Workbench provides the built-in set of queries. To use any query, right-click on the table and choose “Send to SQL Editor“.

Graphical user interface, website Description automatically generated

Insert Statement: Like here we are using “Insert Statement”, the time you click on “Insert Statement”, you will get the following syntax of INSERT query.

You can add values by replacing the values as we have done and then the query can be executed by clicking on the blitz icon. If the query is correct, then it will be executed(without showing any prompt), otherwise, it will return errors.

Select All Statement: To retrieve inserted data, you may navigate to the “Select All Statement”.

After clicking, you will get a built-in query of the Select All statement.

When you will execute this query, the result will be displayed in a new pane as can be seen below.

By following the same ways as mentioned above, you can use update and delete queries as well.

Conclusion

MySQL Workbench is a widely used graphical tool to work on MySQL databases and servers. This tool can be used by database stakeholders, like Database administrators, developers, and designers. This writeup is focusing on installing and using MySQL workbench on Manjaro. The installation is performed here using graphical and command line support of Manjaro. The usage of MySQL Workbench is demonstrated from scratch, like creating a connection, checking the server status, adding new schema, and creating tables. Moreover, you can also perform several operations on tables by using built in SQL queries.

About the author

Adnan Shabbir