connecting to MySQL database thru SSH tunnel

Bob Sneidar bobs at
Wed Dec 7 17:21:14 CST 2011

Help says:
revOpenDatabase("mysql",host[:port], databaseName, [userName],[password],[useSSL], [socket], [timeout], [autoReconnect])

Notice the new useSSL argument? All you have to do now is determine if the host accepts SSL connections, and if so, on what port. I am not sure what you mean by an ssh tunnel. Are you talking about a VPN?


On Dec 7, 2011, at 2:08 PM, Sieg Lindstrom wrote:

> I have an app for managing data in a MySQL database on a remote server. It’s
> worked fine for years but now I would like to route the connection thru an
> SSH tunnel. It uses a port number other than 3306 (PortNumberHere in the
> function example below). So I’ve changed the relevant function from this...
> put 
> revOpenDatabase("MySQL","","myDatabaseName","UserName","myPass
> word") into myDB
> ... which works fine through a normal web connection, to this for the SSH
> tunnel version...
> put 
> revOpenDatabase("MySQL","localhost:PortNumberHere","myDatabaseName","UserNam
> e","myPassword") into myDB
> That doesn’t work. I get the following error message.
> “Can’t connect to local MySQL server through socket ‘tmp/mysql.sock’ ”
> I’m using LiveCode 5.0.1 on Mac OSX. Is there a solution? Some other
> parameter I need to specify? I have sqlite sitting in the same directory as
> LiveCode. Could that be problematic? Thanks.
> Sieg
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

More information about the use-livecode mailing list