Yeah, you could use SSH to forward local port 9999 or some other
random port to the remote 3306, with something like: ssh -N -f -L
9999:otherserverhostname:3306 jshmoe@otherserverhostname.

Then to connect to the other machine via the ssh tunnel, run the client and
connect to that port on localhost, with something like: mysql -h localhost
-P 9999  -u otherserverusername otherserverdatabasename.


Ernie Hershey


-----Original Message-----
From: Gerald Clark [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 03, 2002 11:56 AM
To: MySQL baby
Cc: [EMAIL PROTECTED]
Subject: Re: SSH tunnel MySQL traffic: BOTH remote & local?


You use a different  port # for the tunnel.

MySQL baby wrote:

> If I've got one computer with MySQL client and server on it, running
everything localhost,
> 
> but I want to reach out to another MySQL server, through an SSH tunnel,
for some things,
> 
> does anyone know how to differentiate between the two?
> 
> 
> Usually, for SSH tunnelling, you access a port # at localhost, but if I
also need that port # at localhost, (3306), what's a guy to do?
> 
> 
> Any advice appreciated.
> 
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> 
> 
> 


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to