Remote MySQL Administration for 1and1: Windows

See: Remote MySQL Administration for 1and1

Update March 12 2013: Posted a new link to Cygnative files.

As always, setting up things like this on Windows takes a bit of work. Assuming you already have Socat installed and working on your 1and1 server, I am going to dive right into the setup.

  1. Install Pageant, PuTTY, plink.exe to  ”C:\Program Files\PuTTY” (use the Windows installer from the PuTTY website)
  2. Download Socat binaries from Gentle Kiwi and extract to the PuTTY installation directory.
  3. Download cygnative from Beerensalat Download cygnative and extract to the PuTTY installation directory
  4. Copy mysql-remote.bat to the PuTTY installation directory (see below)
  5. Right click My Computer → Properties → Advanced → Environment Variables, and add the PuTTY installation directory to the PATH
  6. Create PuTTY private key (*.ppk) files, so that you don’t need to provide a password for the SSH connection
  7. Test the mysql-remote.bat script


@echo off

echo Connecting to %1:%2
echo Listening on port %3
socat tcp-l:%3,forever,fork exec:'cygnative plink %1 "socat stdio unix:%2"'

Usage: mysql-remote <host> <path_to_socket_on_remote> <local_listening_port>

Once established connect to MySQL via localhost and the local listening port.