Comments (6)
The common approach for such cases is to establish a ssh tunnel:
nohup ssh -L 6001:127.0.0.1:5432 -N [email protected] -i ~/.ssh/id_rsa > /dev/null &
And then to connect to database using connection string postgresql://db_user@localhost:6001/production
Thus you are not limited to any particular tool.
from sqltabs.
Yes, it is a good point. Just nice to not have this overhead every time I connect. I can close the issue if this is the recommended workaround.
from sqltabs.
while this is a workaround, it is pain in the neck when you have 10+ DBs and constantly juggle ports etc... not to mention when the ssh freezes (e.g. when you unplug your laptop from the network) and your ssh holds the port
this is pretty much the main reason why I keep using Navicat (though SQL Tabs is so much snappier and cleaner for simple scripting)
from sqltabs.
@CzechJiri
I usually have a bash script which reestablishes the tunnels after connection got dropped. I know your pain, I have much more than 10 databases to handle and all are trough ssh tunnelling.
For the moment I can only suggest a little trick I use for tunnelled connections: since it's hard to recognise the connection by port it's possible to name a connection, if you add an alias to the end of connection string separated by 3 dashes like this:
postgresql://db_user@localhost:6001/production --- PRODUCTION
Also I reopen the issue. So it waits for the proper time.
As a draft highlevel design I propose to use a pipeline to make a tunnelled connections:
ssh://sshuser@sshhost:ssport?identity_file=~/.ssh/id_rsa | postgres://pguser@localhost:5432/dbname
Comments are welcome
from sqltabs.
nice trick with the alias, like it a lot
I use ruby ssh gateway library, never used JS library. From the first glance looks simple https://github.com/Finanzchef24-GmbH/tunnel-ssh
from sqltabs.
released with v0.14
from sqltabs.
Related Issues (20)
- Chart building error: ReferenceError: c3 is not defined HOT 3
- Feature Request: add support for SHOW command
- Error : A JavaScript error occurred in the main process HOT 7
- Not running HOT 1
- How to get a document by document id in google firestore? HOT 3
- Could Not Display SQLTABS
- Starting query HOT 2
- For each query execution a new connection is opened HOT 2
- Disconnect from DB HOT 2
- Quoted object info error
- Lost window handler
- How to escape '@' in MySQL username when connecting HOT 2
- How do I query a subcollection in Firestore HOT 2
- how do I select a document in Firestore HOT 3
- Table columns not displayed with Postgresql13
- Connection to Postgres fails for passwords containing hashtags #
- Development - working on sqltabs
- Error: Client does not support authentication protocol requested by server; consider upgrading MySQL client
- www.sqltabs.com is down HOT 1
- Long time/time out when querying firestore
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sqltabs.