Can I connect to a remote datasource (MySQL) using SSH?

212 views
Skip to first unread message

James Pessato

unread,
Apr 6, 2015, 10:48:50 AM4/6/15
to loopb...@googlegroups.com
Am trying to connect to a MySQL database on a vagrant VM using the loopback-connector-mysql however can't seem to get it to connect. 

I connect to the MySQL database with Sequel Pro by SSH.

Am I able to connect to a remote MySQL datasource using SSH with the loopback datasources.json file or another method?

Thanks

Raymond Feng

unread,
Apr 6, 2015, 1:49:55 PM4/6/15
to James Pessato, loopb...@googlegroups.com
You can use ssh tunneling:

ssh -f you@server1 -L 3306:server2:3306 -N

Thanks,

---
Raymond Feng
Co-Founder and Architect @ StrongLoop, Inc.

StrongLoop makes it easy to develop APIs in Node, plus get DevOps capabilities like monitoring, debugging and clustering.

On Apr 6, 2015, at 7:48 AM, James Pessato <pess...@gmail.com> wrote:

Am trying to connect to a MySql database on a vagrant VM using the loopback-connector-mysql however can't seem to get it to connect. 

I connect to the MySql database with Sequel Pro by SSH.

Am I able to connect to a remote database using SSH with the loopback datasources.json file or another method?

Thanks

--
You received this message because you are subscribed to the Google Groups "LoopbackJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to loopbackjs+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

hazem...@gmail.com

unread,
Apr 19, 2017, 7:18:38 PM4/19/17
to LoopbackJS
Have you got it working mate?

Troy Borja

unread,
Sep 7, 2017, 2:41:49 AM9/7/17
to loopb...@googlegroups.com
Hello Mr. Feng,

I am on bluemix. How would I define in datasources.json an ssh connection to mysql to an external mysql server? It would be great if you can give us an example.
Reply all
Reply to author
Forward
0 new messages