[Interest] How to ssh-in then connect to a database in Qt?

Thiago Macieira thiago.macieira at intel.com
Mon Jan 9 20:09:07 CET 2017


On segunda-feira, 9 de janeiro de 2017 20:01:26 PST Jason H wrote:
> This one is a head scratcher for me. I want to write a Qt app that connects
> to a server running SSH, then connect to a database behind it, as it's not
> internet accessible. MySQLWorkbench and others can do this. I'm wondering
> if there is a way d do this in Qt? (Currently the DB is Mysql, but plan to
> move to Postgres later)/
> 
> I guess the fall-back is to use a SSH tunnel via command line?

Launch your ssh process that opens the tunnel, then addDatabase with the 
correct credentials (especially the port number).

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Interest mailing list