SSH tunnel hep

Discussion in 'Server Operation' started by warkry, Apr 17, 2008.

  1. warkry

    warkry New Member

    I am currently trying to set up an SSH tunnel from one server to another and am having difficulty, never done this before. Anyway there are two servers one is a production web server and the other is a test server. The idea is to get hourly updates of the mysql database to the test server from the production server via replication. The test server will then be used for local backups and a few other things.

    First things first I am trying to get the ssh tunnel working so I can test out mysql replication. From the test server i run:

    ssh -fNg -L 4000:127.0.0.1:3306 myuser@productionserver.com

    and after asking for myuser's password it gives me:

    bind: Address already in use


    I really don't know what it's referring to. Any thoughts?
     
  2. topdog

    topdog New Member HowtoForge Supporter

    Why dont you just use mysql replication over an SSL encrypted connection ?

    You cannot bind to 3306 because the server on that machine is using the port already choose another port if you really have to do it this way
     
  3. warkry

    warkry New Member

    Interesting, I was under the impression that I needed to use the mySql port on the production server in order to get replication to work over SSH. After the tunnel is setup you run replication as local host over whatever port is forwarded to 3306 on the host machine. In this case 4000.

    All of the tutorials/guides I have found on the subject have set up the tunnel in this way. Can any one shed some light on this for me?
     
    Last edited: Apr 21, 2008

Share This Page