<p>Something like:</p>
<pre><code>pg_isready --host=192.168.79.8 --username=test --port=5432
</code></pre>
<blockquote>
<p>192.168.79.8:5432 - no response</p>
</blockquote>
<p>Another solutions is telnet:</p>
<pre><code>telnet 192.168.79.8 5432
</code></pre>
<p>Which returns:</p>
<blockquote>
<p>Trying 192.168.79.8...
Connected to 192.168.79.8.
Escape character is '^]'.</p>
</blockquote>
<p>If the database is accessible.</p>

CC BY-SA 4.0
2021-10-05T23:05:26.610Z
2021-10-06T18:12:32.077Z
2021-10-06T18:12:32.077Z
Soerendip
<p>I whished there were a tool like ping for databases? I just want to ping the database and see if it is accessible from a remote server from Linux command line (bash).</p>
<p>I read about telnet, but I am not sure how it works.</p>
<p>Any suggestions?</p>

<postgresql>
How to quickly test if postgres database is accessible?
Soerendip
# How to quickly test if postgres database is accessible?

(Asked by: username_0 on 2021-10-05)

I whished there were a tool like ping for databases? I just want to ping the database and see if it is accessible from a remote server from Linux command line (bash).

I read about telnet, but I am not sure how it works.

Any suggestions?

**Tags:** postgresql


---

## 1 answers

### Answer by username_0 on 2021-10-05. Score: 9

Something like:
pg_isready --host=192.168.79.8 --username=test --port=5432


192.168.79.8:5432 - no response

Another solutions is telnet:
telnet 192.168.79.8 5432

Which returns:

Trying 192.168.79.8...
Connected to 192.168.79.8.
Escape character is '^]'.

If the database is accessible.


---

