Skip to main content

Posts

Showing posts with the label DB

PostgreSQL DB with pgAdmin4 access through SSH tunnel

Despite using console most of the time I have a preference to edit PostgreSQL databases through UI. Especially when it comes to remote side. Usually one can access this through  $ psql  command. However this tends to writing raw SQL queries and a lot of typing in overall. Here is a way to do it with UI. First one needs to make a tunnel.Command is fairly simple: ssh - fNg - L 5555 : localhost : 5432 { username } @ { host . com } One has a tunnel afterwards. This command opens a SSH connection in the background mapping your local port 5555 to your server’s port 5432 (Postgres’ default port). To understand one can observe the meaning of the flags via  $ man ssh  to see what each of these flags doing.  It can be accessed via localhost tools like pgAdmin4 at localhost and port 5555 DB config would look like so:

Installing CouchDB for Mac OS X. Nuances.

Our project will have a new architecture changes in future. We've chosen from different tech. But now we 're experimenting with CouchDB a bit. It may become a part of our new architectural Changes. I'll try to cover most of newbies observations with CouchDB for Python(Django) programmer, planning to use it in your project. First article will be, unsurprisingly, installing CouchDB under Mac OS X. It, sure, has some inches that you need to scratch. So let's roll... CouchDB is not a simple SQL database like you used to install before. It has own server to accept connections. And, in fact, you can work with database from your browser GUI (without other server proxy, like Django or ...). Anyway it will not be our target. Building JS UI is quite easier with CouchDB and changes your logic dramatically. To build UI with Python we need some proxy parts. Anyway, again, CouchDB is a standalone server, that runs on your server's port and talks to your APP/Browser/wha...