Can you point me to some docs on connecting to MySQL via an ssh tunnel. It's not something I've heard of before. Does MySQL not support SSL connections out of the box?
I believe that the default behavior for MySQL is to not allow remote connections (hence your need to ssh into the server hosting it). I'm able to use MySQL at work and connect directly to remote databases in R the same way as I do through SequelPro (using SSL and not needing ssh). You probably just need to either: A) talk with the DBA/sysadmin/devops team to consider allowing connects to the remote server from a whitelisted IP, for example your office; or B) try using ssh tunneling to forward the mysql port (typically 3306) to your localhost and using that to connect from R.
I like the idea daniel is mentioning above. Isn't it possible to add the parameters to pool package to allow for ssh tunneling to dbs that won't accept direction connections. In addition @robsalasco for a work around - i write below and what do you think?
For a shiny app running with the pool library would you recommend tunneling within the script itself before attempting to perform the db connection. Something like this :-
Even third party tools for quering the data like sqltabs or popsql have additional parameters that enable you add the details to enable the tunneling as added by Daniel above in his missing part.