A2 Hosting Forums

Full Version: mySQL Remotely
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am attempting to access a mySQL database through ODBC from my Mac OS X laptop. I have read Knowledge Base Article #320. It suggests a ssh tunnel from my port 3306 to their port 3306.

Now I have not set any DNS services pointing to my A2 account. I have been using a2hosting.com or www34.a2hosting.com

I set up a terminal command as stated in the KBA #320.

ssh -p7822 matteo@a2hosting.com -L 3306:localhost:3306

So, I go to logon and it ask for my password. But fails due to bad user/password. I have tried the default password, I've changed my password, no luck.

Any ideas?
Your shell account is not matteo@a2hosting.com; it would be matteo@yourdomain.com or matteo@www34.a2hosting.com. I'm not sure what you mean by "I have not set any DNS services pointing to my A2 account" but I'm guessing that means your domain is currently hosted elsewhere. So you need to use a hostname that *does* have DNS set up for it, or the native hostname of the server (www34.a2hosting.com or a2s34.a2hosting.com)  That's telling it what user and server to connect to; as you have written it, you're trying to connect to A2's web server, which of course is failing... Smile
I figured it out. Firstly, my domain IS hosted by another service. So I needed to find the host for MY port 3306 at A2Hosting.

As it turns out if I had paid attention to the cPanel, I would have seen the SHARED IP ADDRESS for MY services. Using this I was able to get what I was after. Which was to configure my MacOS X laptop running FileMaker Pro rDBS to access mySQL at A2 through ODBC and exchange data seamlessly. Works great!

The only problem I've have left is that A2 wants my MacOS X to establish an ssh tunnel for security before connecting through ODBC. I need to make a script ahat auto tunnels with password, or figure out how to make it a permanent tunnel.
If you have a static IP address we can add a firewall exception for MySQL connections.  If not, then a shell script that sets up the tunnel for you then starts ODBC would probably be your best bet.
Reference URL's