PhpStorm: database host not accessible when in docker

56 Views Asked by At

Create simple Laravel application and up Laravel Sail.

Here is how database service looks in Docker Desktop:

enter image description here

Then try (unfortunately) to access this database host from PhpStorm Database Tools:

enter image description here

At this screenshot appear still unknown error of connection. More information you can see at the next screenshot when I try to open table (table list remains since this database connection was not in docker):

enter image description here

So, host pgsql is not reachable. Same for localhost or host.docker.internal.

How to open this database in PhpStorm Database Tools?

0

There are 0 best solutions below