Using MSAccess VBA to connect to MySql through an SSH tunnel, and run SQL statements against a MySql database. Note: I will be redistributing this app.
I had a friend set up a remote virtual machine that host MySql.
He told me: “You should be able to SSH into this server and connect to the MySQL server locally. “
So, using VBA, what’s the best way to setup an SSH connection and then provide SQL statements to the MySql. My guess is I first set up a SSH tunnel, then use an ODBC connection?
I was hoping to find an ODBC connector that would provide the SSH login feature built in but the latest version I found was ‘MySql ODBC 5.2’. it only allows for SSL certificates but not an SSH connection.
This is the info my friend sent me (actual logins changed for this example):
OS: Ubuntu 13.04
SSH Server: www.Server.com
SSH Port: 9950
MySQL Server: 127.0.0.1 (localhost)
MySQL Port: 3306
MySQL Username: root
MySQL Password: Password2
Note: I was successful connecting to MySql using “MySql Workbench” with the login info, so I know the he set everything up correctly on his end.
Any suggestions on the best approach?
He also told me : " It will do the port forwarding for you, no PuTTY needed."