How do I connect to a database on a Linux virtual server?

To connect to MySQL and MariaDB databases on Linux virtual servers, use a tool like MySQL Workbench (cross-platform), or Sequel Pro (Mac OS X). Both are free applications.

Download MySQL Workbench at: https://dev.mysql.com/downloads/workbench/
Download Sequel Pro at: http://www.sequelpro.com/

Download

Visit MySQL Workbench download page


Select your platform and click the Download button. 

On the next page, click "No thanks, just start my download" link to start your download. Install as you would other software on your computer.


Configure

Open MySQL Workbench and click the Plus button next to MySQL Connections to add a new connection.

Enter a connection name (for example, the name of your virtual server).

Select Standard TCP/IP over SSH as the connection method.

In the SSH hostname, enter the server's hostname (for example foo.vm.uic.edu).

Enter your UIC NetID as the SSH username. Use either your UIC password, or an SSH key (highly recommended) to authenticate. If authenticating with a password, do not save it here. Instead, you will be prompted for the password when you connect.

MySQL hostname should be set to 127.0.0.1 (default).

Enter your database login credentials in the Username and Password field.


Connect

Double-click on your new connection to connect. You may see the following message when connecting for the first time:

SSH Server Fingerprint Missing

The authenticity of host 'foo.vm.uic.edu:22 (foo.vm.uic.edu:22)' can't be established.
ssh-rsa key fingerprint is 4bac1cf45430196928072b0d5623ff7f
Are you sure you want to continue connecting?

Click Continue.

Once connected, you should see your databases in the Schema section:



Visit MySQL Workbench documentation to learn more about how to use MySQL Workbench.

PHPMyAdmin

PHPMyAdmin is a great tool, but there are drawbacks. It has to be installed and maintained on the virtual server. If you manage databases on more than one virtual server, the installation and maintenance will start taking up more of your time.

As a server-side application, it also poses a security risk. Logs show that many of our virtual servers are regularly polled for existence of "/phpmyadmin" and variations. Though you can limit the risk by crafting a special URL to access PhpMyAdmin, a desktop tool poses less risk and does not require as much maintenance.

Useful links




Keywords:MySQL Workbench, Sequel Pro, PhpMyAdmin, MariaDB, MySQL   Doc ID:92965
Owner:Marius H.Group:University of Illinois at Chicago ACCC
Created:2019-07-09 12:12 CSTUpdated:2019-10-16 11:08 CST
Sites:University of Illinois at Chicago ACCC
Feedback:  0   0