Connect to Postgresql Container From Other Container Within Same Network

When you have 2 container on same docker network, to connect to each other we do not need to use exposed port, instead we use default port (port defined inside container) Example if we define port 5433:5432, if connect from outside network we should use 5433, but if we want to connect from inside network we can use 5432. . . . selengkapnya>>

Postgresql Show DB Size

To show db size on postgresql, you can use psql command bellow: \l+ Additional if you want to show table size, you can use this command bellow: \d+ . . . selengkapnya>>

Postgresql Open/Setup Remote Connection

Secara default postgresql hanya menerima koneksi dari localhost, namun untuk beberapa case kadang diperlukan remote koneksi ke postgresql. Untuk itu perlu perubahan konfigurasi supaya postgresql data menerima koneksi dari luar. Pertama kita coba check dengan netstat. Pada terminal masukan perintah netstat -nlt. Perintah tersebut akan mengeluarkan list port yang. . . selengkapnya>>

Postgresql Allow Connection Without Password

Find pg_hba.conf, if you can connect to db template1, you can use this command. psql -d template1 show hba_file; Command above will result /etc/postgresql/10/main/pg_hba.conf for default postgresql installation. Edit pg_hba.conf, search for # IPv4 local connections, insert this value : host    all            . . . selengkapnya>>

  • First
  • Previous
  • 1
  •  Next 
  • Last

zuka.one
©2011