php – 如何在Laravel Homestead中使用postgreSQL
发布时间:2020-12-14 19:44:49 所属栏目:大数据 来源:网络整理
导读:我可以迁移到我的家园. 这是我的.env DB_CONNECTION=pgsqlDB_HOST=localhostDB_PORT=54320DB_DATABASE=internDB_USERNAME=homesteadDB_PASSWORD=secret 我在postgreSQL中创建了一个新的服务器 server name = Homestead,username = homestead,password = secr
我可以迁移到我的家园.
这是我的.env DB_CONNECTION=pgsql DB_HOST=localhost DB_PORT=54320 DB_DATABASE=intern DB_USERNAME=homestead DB_PASSWORD=secret 我在postgreSQL中创建了一个新的服务器 server name = Homestead,username = homestead,password = secret. 然后,我做了迁移,并将所有表创建到我的数据库中(server = 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" = user@gmail.com limit
您的端口末尾有一个额外的0.将DB_PORT = 54320更改为DB_PORT = 5432
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |