Connecting to MySQL using DBTools and PuTTY

From: w_searle (warren_at_warrensearle.co.uk)
Date: 08/24/05


Date: 24 Aug 2005 11:53:06 -0700

Hi there,

I have a problem connecting to a remote MySQL database via SSH using
DBTools and PuTTY. The problem is described below and I am really
hoping you can help!

In short I can connect to the mysql db when logging in via putty BUT
when I try to log in via DBTools I get an error message "Lost
connection to MySQL server during query". Details of what I've set up
follow:

The Server I'm connecting to
----------------------------
The mysql database cannot be connected to directly however the hosting
company do offer full SSH access. For reference the connection details
I have are (say) as follows:

SSH
Host: webaddress_SSH.com
User: user_SSH
Pass: pass_SSH

MySQL
Host: webaddress_SQL.com
Port: 3306
DB: database_name
User: user_SQL
Pass: pass_SQL

What I have set up on my computer (client)
------------------------------------------
I am running windows server 2003. It has ZoneAlarm installed but I have
tried turning this off etc just in case this was causing a problem
however this makes no difference.

PUTTY
Hostname: user_SSH@webaddress_SSH.com
SSH Tunnel: L3306 localhost:3306 (with Local and Auto radio boxes
chosen)
(Then I log in using)
Passowrd: pass_SSH

DBTools
Engine: MySQL
Name: some_name_here
Hostname: localhost
Port: 3306
User ID: user_SQL
Passowrd: pass_SQL
Database: database_name

Thoughts...
--------------
I have tried various options for using DBTools but I just can't connect
correctly. It would seem that I need to specify the MySQL Host address
somewhere (webaddress_SQL.com) but I'm not quite sure where?! I have
tried using "webaddress_SQL.com:3306" in the Tunnel instead of
"localhost:3306" but this doesn't work. I have tried incorporating it
into the DBTools user id or database name using
"user_SQL@webaddress_SQL.com" etc but again this doesn't seem quite
right.

Logging in to putty and typing the following does get me into the MySQL
db:

> mysql -u user_SQL -h webaddress_SQL.com -p database_name

Therefore I know I can connect, it is just a problem when using DBTools
- particularly as I don't know where to specify the mysql host address
(as I use localhost in order to use ssh!).

Hope you can understand what I'm trying to say and suggest how I may
resolve the problem.

Very many thanks for your time.



Relevant Pages

  • Re: Preliminary Report on D2005A (Trial)
    ... "Derek Davidson" wrote in message ... >> connecting to SQL2000 and mySQL, ... > Abstract) and I've moved all of my multi-tier development onto this. ...
    (borland.public.delphi.non-technical)
  • MySQL - FBSD 6.0 Freezing server.
    ... I been getting server freezups the past two weeks, but have determined it is happening when connecting to mysql port 3306 remotely. ...
    (freebsd-questions)
  • RE: Connecting to MySQL
    ... One of them is connecting it through of ODBC. ... If you have .NET Framework 1.0, you'll have to install ODBC .NET. ... you need the correct APIs (or drivers) to do it. ... MySQL recomends the next free drivers (there are a lot of drivers, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: MySQL 4.x questions...
    ... > I installed MySQL server 4.1.0_1 to support the PostNuke CMS and the phpBB ... Both users groups tell me that there's a mysql ... connecting using the unix socket will ...
    (freebsd-questions)
  • odd characters in SQL queries doing odd things to putty
    ... I'm using Putty to SSH into our remote Linux server. ... mySQL databases, we have a table of users. ... store passwords we have as type "BLOG" and we use the ENCODE/DECODE to ... I think some of those characters are being ...
    (comp.os.linux.misc)