Installing MySQL Administrator Tool To Connect To Remote Databases

Want to support HowtoForge? Become a subscriber!
 
Submitted by SamTzu (Contact Author) (Forums) on Mon, 2011-09-12 20:33. :: Debian | Ubuntu | MySQL

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:

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

 

Sami Mattila
Internet-Content


Telephone:
+358.9.42833310
Email: firstname.lastname@internet-content.org
Shop: https://shop.internet-content.net
Site: http://www.internet-content.net
Blog: http://www.internet-content.net/en/blog

Social:IC Facebook IC Linkedin IC Blog RSS IC WordPress

Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.
Submitted by Giuseppe Maxia (not registered) on Mon, 2011-09-12 22:58.

Probably it comes as a surprise for you, but MySQL Administrator was dismissed already in 2009, and before its dismissal, it hadn't been updated for one year more.

By recommending users to install an obsolete tool, you are not helping anyone.

 The tool to use now, including for connecting to remote servers, is MySQL Workbench.

Submitted by muffycompo (registered user) on Mon, 2011-09-26 09:51.
I agree that this tool is very old, but I believe it is not proper to just condemn this contribution. We should be a little diplomatic things like this. Nice share any way.