Remote MySQL Administration for 1and1: Windows
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.
- Install Pageant, PuTTY, plink.exe to ”C:\Program Files\PuTTY” (use the Windows installer from the PuTTY website)
- Download Socat binaries from Gentle Kiwi and extract socat-x.x.x.zip to the PuTTY installation directory.
Download cygnative from BeerensalatDownload cygnative and extract cygnative1.2.zip to the PuTTY installation directory
- Copy mysql-remote.bat to the PuTTY installation directory (see below)
- Right click My Computer → Properties → Advanced → Environment Variables, and add the PuTTY installation directory to the PATH
- Create PuTTY private key (*.ppk) files, so that you don’t need to provide a password for the SSH connection
- 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"' pause
Usage: mysql-remote <host> <path_to_socket_on_remote> <local_listening_port>
Once established connect to MySQL via localhost and the local listening port.