List:General Discussion« Previous MessageNext Message »
From:John Barton Date:January 3 2002 5:28pm
Subject:RE: SSH tunnel MySQL traffic: BOTH remote & local?
View as plain text  
Try mapping your remote mysql to a different local port, then specify that
port number when you connect.

For example:
'ssh -L 3307:hostip:3306 hostname' will map port 3306 on the remote machine
to port 3307 on your local machine. Then, use
'mysql -P 3307 -u xxxxx -p etc.' to connect to port 3307 on your local
machine, and you will hit your remote mysql



> Using the -h <hostname or IP> should do it.
> mysql -h 10.129.0.2 -u user -p password yadayadayada
>
> -----Original Message-----
> From: MySQL baby [mailto:mysql@stripped]
> Sent: Thursday, January 03, 2002 10:28 AM
> To: mysql@stripped
> Subject: SSH tunnel MySQL traffic: BOTH remote & local?
>
>
> 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 <mysql-thread95261@stripped> To
> unsubscribe, e-mail
> <mysql-unsubscribe-Gary.Every=ingramentertainment.com@stripped>
> 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 <mysql-thread95262@stripped> To
> unsubscribe, e-mail
> <mysql-unsubscribe-jbarton=technicalworks.net@stripped> Trouble
> unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


John Barton
jbarton@stripped



Thread
SSH tunnel MySQL traffic: BOTH remote & local?MySQL baby3 Jan
  • Re: SSH tunnel MySQL traffic: BOTH remote & local?Gerald Clark3 Jan
RE: SSH tunnel MySQL traffic: BOTH remote & local?Gary.Every3 Jan
  • RE: SSH tunnel MySQL traffic: BOTH remote & local?John Barton3 Jan
RE: SSH tunnel MySQL traffic: BOTH remote & local?Ernie Hershey3 Jan