Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HeidiSQL won't list my database

My postgres yaml part looking like this:

postgres:
    container_name: 'postgres'
    image: postgres:10.1
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=root
      - POSTGRES_DB=myids
    ports:
      - "5432:5432"
    networks:
      - app-network

Then when I am logging in with that credentials using HeidiSQL I cant see my database: enter image description here

Any ideas?

Update thanks to this answer I managed to find my database https://dba.stackexchange.com/a/1304 using this select:

SELECT datname FROM pg_database
WHERE datistemplate = false;

Now the question why HeidiSQL won't show that?

like image 521
sreginogemoh Avatar asked Nov 23 '17 11:11

sreginogemoh


1 Answers

We have to specify the database name in the connection manager, only then will it display the selected database. Please refer to the images below... enter image description here

enter image description hereenter image description hereenter image description here

There is no provision to view all the databases in PostgreSQL in HeidiSQL, but for MySQL the database name field is optional.

like image 150
Cherry g Avatar answered Sep 21 '22 10:09

Cherry g