Mailinglist Archive: opensuse (5130 mails)
| < Previous | Next > |
Permanent sshtunnel for mysql master/slave connection ?
- From: "Wilfred van Velzen" <wvvelzen@xxxxxxxxx>
- Date: Wed, 17 May 2006 09:52:05 +0200
- Message-id: <ab7d85360605170052m22b72a24hc35f5f6f9fde5798@xxxxxxxxxxxxxx>
Hi,
I have a little script (on a Suse 10.1 server) that creates a ssh tunnel to
connect a MySql slave server with it's master.
The script does something like this:
while true; do
ssh -oBatchMode=yes -L 33306:127.0.0.1:3306 -N root@someserver >>$LOG
2>&1
sleep 30
done
The loop is to re-establish the connection when the netwerk connection goes
down for some reason.
This works ok, but when I run this script on a remote shell the script gets
killed when I close the shell. So should I make a script in /etc/init.d to
make
this a more permanent solution, or is there a better way? And I also have
the
feeling the loop isn't the best solution for the problem? ;)
--
Bye, Wilfred.
I have a little script (on a Suse 10.1 server) that creates a ssh tunnel to
connect a MySql slave server with it's master.
The script does something like this:
while true; do
ssh -oBatchMode=yes -L 33306:127.0.0.1:3306 -N root@someserver >>$LOG
2>&1
sleep 30
done
The loop is to re-establish the connection when the netwerk connection goes
down for some reason.
This works ok, but when I run this script on a remote shell the script gets
killed when I close the shell. So should I make a script in /etc/init.d to
make
this a more permanent solution, or is there a better way? And I also have
the
feeling the loop isn't the best solution for the problem? ;)
--
Bye, Wilfred.
| < Previous | Next > |