I’m branching out into using emacs’ sql-mode to work with some databases at my job. Some of these databases are not accessible directly from my workstation – I need to ssh to a gateway server before I can connect to them (i.e., mysql -h 'foo_host' -u 'foo_user' --password='double_foo' -D foo_db works in a terminal session on the gateway server, but doesn’t work when run directly on my machine). I searched around EmacsWiki and the Customize interface for sql-mode a bit, but I can’t find a built in way to say “for connections to the Foo database, you need to use host Bar as a proxy.” Is there a way to tell sql-mode to do this, or am I limited to hacking it by making an ~/.ssh/config entry with a foo-db-specific name and an appropriate ProxyCommand invocation?
I’m branching out into using emacs’ sql-mode to work with some databases at my
Share
I don’t think there is. But it should be fairly easy to hack sql.el
in order to support this (by introducing a new connection parameter
`sql-remote’). In the meantime you have to switch manually somehow to
the `directory’ of the gateway, e.g. with
or from lisp