2017-10-05 134 views
0

我可以迁移到我的家园。 这是我.ENV如何在Laravel Homestead中使用postgreSQL

DB_CONNECTION=pgsql 
DB_HOST=localhost 
DB_PORT=54320 
DB_DATABASE=intern 
DB_USERNAME=homestead 
DB_PASSWORD=secret 

和我在PostgreSQL用于服务器名称=家园,用户名=宅基地,密码=秘密进行新的服务器。然后,我做迁移和所有表已存储到我的数据库(服务器= homestead) 问题是,当我想要在我的网站登录。它发生这样的错误

SQLSTATE[08006] [7] could not connect to server: Connection refused↵ Is the server running on host "localhost" (::1) and accepting↵ TCP/IP connections on port 54320?↵could not connect to server: Connection refused↵ Is the server running on host "localhost" (127.0.0.1) and accepting↵ TCP/IP connections on port 54320? (SQL: select * from "users" where "email" = [email protected] limit 
+0

默认数据库名称是'homestead',并尝试从流浪盒('vagrant ssh')运行它 – morph

+0

我试过了,但仍然出现错误..它在mysql中工作,但不在我的postgresql @morph –

+0

是否可以通过命令行或某些gui应用程序连接到pgsql服务器? – morph

回答

0

您在端口末尾有一个额外的0。将DB_PORT=54320更改为DB_PORT=5432

相关问题