Cheap VPS & Xen Server

Residential Proxy Network - Hourly & Monthly Packages

Installing MySQL Administrator Tool To Connect To Remote Databases


This tutorial provides step-by-step instructions on how to install MySQL Admin tool on an Ubuntu 11.04 system and how to connect to a remote host with it. This should also work on most Debian based operating systems.

I do not issue any guarantee that this will work for you!

 

Installing MySQL Administrator

First we find out the name of the tool using command line.

apt-cache search mysql | grep admin

This tells us that the package we are looking for is called…

mysql-admin – GUI tool for intuitive MySQL administration

Then we install it with command…

sudo apt-get install mysql-admin

You can now start it from the ‘Programming Menu’,

 

Using MySQL Administrator

Because almost all MySQL servers have a firewall protecting the port 3306 we must first create a tunnel to access the MySQL server on the remote host. Therefore we create a tunnel to connect to a MySQL server using SSH with this command…

ssh -L 7777:localhost:3306 root@mysql.server.com

Now our local port 7777 should listen to the database server’s port 3306 where MySQL normally resides. Let’s see if this is true. (You might also want to give this command on the remote host.)

netstat -tapn

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      852/sshd
tcp        0      0 127.0.0.1:7777          0.0.0.0:*               LISTEN      22324/ssh
tcp        0      0 127.0.0.1:7777          127.0.0.1:59683         ESTABLISHED 22324/ssh
tcp6       0      0 :::22                   :::*                    LISTEN      852/sshd
tcp6       0      0 ::1:7777                :::*                    LISTEN      22324/ssh

As we can see our localhost IP address 127.0.0.1 is listening to port 7777. Also tcp6 is doing so on 0 ::1.

Now all we have to do is use the tunnel to gain access to the remote DB server. Depending on your host file configuration you might have to use a different name for your local PC.

I used the TCP v.6 name localhost6 to connect to my local port 7777. Normally you want to use either localhost or 127.0.0.1 for the connection.

Start your MySQL Administrator and connect to the remote host.

Connect with the local IP address 127.0.0.1:

Screenshot_MySQL_Administrator

Connect with local address localhost6:

Screenshot_MySQL_Administrator_ipv6

Connection error. Check your localhost name and or your username/password.

Screenshot_MySQL_Administrator_Error

This is what a successfull connection looks like.

Screenshot_MySQL_Administrator_In_use

Comments

comments