encrypting an external mysql database.

Discussion in 'MySQL' started by BorisD, Apr 13, 2010.

  1. #1
    Hi Guys,

    Any and all help is apriciated,

    I have a server that i placed my website on, and another where i want to have a back end on, and all my databases. (both are dedicated)

    Now i know its not too hard to allow external mysql connection on the database server, but i wouldn't want to transmit sql parameters unencrypted over the net.

    What can be done (and how) to encrypt on one machine, and send/ worked with encrypted.

    Thanks in advance.
     
    BorisD, Apr 13, 2010 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    Is there any possibility of connecting the 2 servers together via an ethernet crossover cable? Completely solves the security issue, and you get near the full bandwidth of the connection, usually 1000Mpbs, 2000Mbps full-duplex nowadays.

    Otherwise, your best bet is to use mysql over a ssh tunnel for a very secure connection.
     
    jestep, Apr 13, 2010 IP
  3. BorisD

    BorisD Well-Known Member

    Messages:
    210
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    105
    #3
    thanks, as far as we currently stand, i dont think i can do a direct connection.


    thanks for the ssh tunnel suggestion, i will lookinto that and find a guide. thanks again.
     
    BorisD, Apr 13, 2010 IP
  4. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #4
    Here's a guide on basically what you need to do: http://www.brandonchecketts.com/archives/creating-a-permanent-ssh-tunnel-between-linux-servers

    Yours may differ based on the type of linux (assuming linux) that your server is using.

    You will want to us a key pair and not user/password authentication for the ssh connection. There are also ways to pre-encrypt the data and then send it over a non-secure connection, but the ssh tunnel is by far the most reasonable on resources and should work very well once configured.
     
    jestep, Apr 14, 2010 IP