I can do migration to my homestead. this is my .env
DB_CONNECTION=pgsql
DB_HOST=localhost
DB_PORT=54320
DB_DATABASE=intern
DB_USERNAME=homestead
DB_PASSWORD=secret
And I make a new server in my postgreSQL with
server name = Homestead,
username = homestead,
password = secret.
then, I did migration and all the table created into my database(server=homestead)
The problem is, when I want to do login in my site. It occurs an error:
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
Laravel supports Postgres out-of-the-box (although it suggests MySQL in its example configuration). In this section, you'll start a new Laravel project with the Authentication scaffolding. Then you'll configure it to use Postgres as a data store.
Laravel makes connecting with Postgres databases and running queries extremely simple out of the box. The Postgres database configuration for your application is located at Laravel Project Root Folder, config/database. php . In this file you may define Postgres database connection for your Laravel Application.
Connecting To Your Databases To connect to your MySQL or Postgres database from your main machine via Navicat or Sequel Pro, you should connect to 127.0. 0.1 and port 33060 (MySQL) or 54320 (Postgres). The username and password for both databases is homestead / secret .
You have an extra 0 at the end of your port. Change DB_PORT=54320
to DB_PORT=5432
try to access your homestead with ssh.
i think u already change the password from the inside
from laravel documentation i think that config should work
or try this command after u change the config
php artisan config:cache
and php artisan cache:clear
https://laravel.com/docs/5.6/homestead#connecting-to-databases
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With