How to install and use MySQL Workbench on Ubuntu 18.04

MySQL Workbench is a MySQL database administrators and architects for cross-platform graphics applications. It is used to manage databases and users, create and run SQL queries, configure the server for backup, implementation of migration tools.

prerequisites

Before continuing with the tutorial, make sure you log in as a user with sudo privileges.

MySQL Workbench is installed on Ubuntu

Installed on the Ubuntu MySQL Workbench is a very simple process. Update Package Index and install MySQL Workbench package:

sudo apt update
sudo apt install mysql-workbench

How to install and use MySQL Workbench on Ubuntu 18.04Ubuntu default may not always be the latest version of MySQL Workbench package repository provides.

Start MySQL Workbench

Now that MySQL Workbench is installed on your Ubuntu system, you can by typing mysql-workbenchor clicking MySQL Workbench icon ( Activities -> MySQL Workbench) to start it from the command line.

When you first start MySQL Workbench, the following window should appear:

How to install and use MySQL Workbench on Ubuntu 18.04

Use MySQL Workbench

One of the most useful features of MySQL Workbench is that it allows you to easily configure SSH tunnel to local and remote servers. So you do not need to MySQL server exposed to the outside world, you only need remote access to SSH servers.

To add a new connection, click the plus sign next to ⊕ "MySQL Connections" circled.

Will open a new window "Setup New Connection form". In this example, we will connect to a remote server via SSH. Enter a meaningful name in the "Connection name" field, and Standard TCP/IP over SSHselect from the "connection method" drop-down list.

  • In the "SSH Hostname", the host name or IP address of the server, and then enter the SSH port.
  • Enter your remote "SSH Username". For authentication, you can use the user password or SSH key.
  • Leave the default value "MySQL Hostname" field (127.0.0.1).
  • Enter the remote database login credentials in the "Username" and "Password" field.

When finished, click "Test Connection" button.

If this is the first time you connect to the server via SSH, you will see the message "SSH Server Fingerprint Missing" and the like, click "Continue".

If the test is successful, you will see the following:

How to install and use MySQL Workbench on Ubuntu 18.04

The new connection will be displayed on the start page MySQL Workbench. Double-click it to connect.

Once connected, you should be like the following, including the Schema section lists all databases:

How to install and use MySQL Workbench on Ubuntu 18.04How to install and use MySQL Workbench on Ubuntu 18.04

in conclusion

You have learned how to install on Ubuntu 18.04 Desktop MySQL Workbench. You can now start to manage MySQL users and databases. To find out more about how to use MySQL Workbench, please visit the official MySQL Workbench page.

Guess you like

Origin www.linuxidc.com/Linux/2019-08/159899.htm