HeidiSQL不会列出我的数据库

问题描述 投票:0回答:1

我的postgres yaml部分看起来像这样:

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

然后,当我使用HeidiSQL使用该凭据登录时,我无法看到我的数据库:enter image description here

有任何想法吗?

感谢这个答案更新我设法使用此选择找到我的数据库https://dba.stackexchange.com/a/1304

SELECT datname FROM pg_database
WHERE datistemplate = false;

现在问题为什么HeidiSQL不会显示出来?

postgresql docker docker-compose heidisql
1个回答
1
投票

我们必须在连接管理器中指定数据库名称,然后只显示所选数据库。请参考以下图片。在这里输入图像描述qazxsw poi

enter image description hereenter image description hereenter image description here

他们没有规定在heidisql中查看postgresql中的所有数据库,但对于mysql,我们数据库字段是可选的。

© www.soinside.com 2019 - 2024. All rights reserved.