title: In emacs' sql-mode, how can I connect to a SQL DB through a proxy or gateway?
body: <p>I'm branching out into using emacs' <code>sql-mode</code> 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., <code>mysql -h 'foo_host' -u 'foo_user' --password='double_foo' -D foo_db</code> 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 <code>sql-mode</code> 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 <code>sql-mode</code> to do this, or am I limited to hacking it by making an <code>~/.ssh/config</code> entry with a foo-db-specific name and an appropriate ProxyCommand invocation?</p>