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
Ubuntu default may not always be the latest version of MySQL Workbench package repository provides.
sudo apt install mysql-workbench
Start MySQL Workbench
Now that MySQL Workbench is installed on your Ubuntu system, you can by typing mysql-workbench
or 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:
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 SSH
select 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:
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:
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.