【问题标题】:Cant initialize database on google cloud platform谷歌云平台无法初始化数据库
【发布时间】:2017-04-17 19:04:42
【问题描述】:

这是我要安装的数据库(附带 4 条非常容易遵循的简短说明):https://github.com/toddwschneider/nyc-taxi-data

我使用 git clone 将存储库带到我的虚拟机。接下来我 cd 进入它并运行 initialize_database.sh。这是发生了什么:

pic of terminal 我尝试使用的密码是我的 Bitnami Launchpad 提供的密码,上面说管理员用户是 postgres,但是当我使用它时,它说我的谷歌帐户 kzherbert。我试过 su postgres 但它不是服务器上的用户,所以它不能那样工作。我可以使用 psql -U postgres 的 postgres 密码,这会将我带到 psql 终端。另外,我也尝试过使用我的谷歌帐户密码,但它不起作用。我对图片真正感兴趣的是 shapefile 的相关性以及为什么它重复并且不允许我退出

非常感谢任何和所有帮助。

【问题讨论】:

  • postgres 854 1 0 15:38 ? 00:00:00 /opt/bitnami/postgresql/bin/postgres.bin -D /opt/bitnami/postgresql/data postgres 856 854 0 15:38 ? 00:00:00 postgres: checkpointer process postgres 857 854 0 15:38 ? 00:00:00 postgres: writer process postgres 858 854 0 15:38 ? 00:00:00 postgres: wal writer process postgres 859 854 0 15:38 ? 00:00:00 postgres: autovacuum 启动器进程 postgres 860 854 0 15:38 ? 00:00:01 postgres: stats collector process postgres 5949 854 0 17:31 ? 00:00:19 postgres: postgres postgres 73.237.197.185(60776) idle kzherbe+ 6226 5963 0 18:37 pts/0 00:00:00 grep post
  • 这些是运行 ps -ef | 的结果grep "post" 根据这个帖子检查服务器:stackoverflow.com/questions/30095546/…

标签: postgresql google-cloud-platform bitnami


【解决方案1】:

问题在于您尝试安装的数据库(统一的纽约市出租车和优步数据)假定您是从头开始安装 PostreSQl,而不是使用 Bitnami Image 中包含的数据库。

您使用的脚本假定连接数据库的用户与您用于通过 SSH 连接到服务器的系统用户相同(在您的情况下为 kzherbert)。但是,您尝试使用的密码是用户 postgres 的密码。

您需要使用 Google 提供的密码和用户 postgres 连接到 PG,并使用您想要的密码创建用户 kzherbert

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-09-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-06-26
    • 2019-05-26
    • 2020-06-02
    相关资源
    最近更新 更多