2015-10-23 25 views
0

我不是说这个问题以前没有问过,但我无法找到这个问题的答案。所以这里是我的问题。希望有人能引导我走向正确的道路。如何在laura上启用heroku上的postgres 5.1

Heroku上的.env文件看起来像这样。

DB_HOST=postgres://somevalue.compute-1.amazonaws.com:5432 
DB_DATABASE=somevalue 
DB_USERNAME=secret username 
DB_PASSWORD=secret password 

当我运行php artisan migrate时,以下是错误。

SQLSTATE[08006] [7] could not translate host name "postgres://somevalue.compute-1.amazonaws.com:5432" to address: Name or service not known 

回答

3

删除Postgres的://从DB_HOST端口号,它应该是这样的

DB_HOST=somevalue.compute-1.amazonaws.com 
相关问题