jeudi 1 juillet 2021

Cannot connect Laravel to Pgsql - error Access denied for user 'homestead'@'localhost'

Am a beginner who is trying to connect Laravel with pgsql . I have successfully created a database in pgsql. but when tried php artisan:migrate install , i got the error Access denied for user 'homestead'@'localhost' .How to resolve this? Please help me with ur suggestions.

I have tried many things available in the internet like clearing cache & config- php artisan cache:clear php artisan config:clear php artisan config:cache, stopping & restarting artisan server, changing db variables of .env file back to the default and viceversa, renaming .env fle etc. but nothing worked. Also tried GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO postgres; in psql, which shows GRANT msg, but still the same error persists.

Below given are the relevant lines of my .env file

DB_HOST=127.0.0.1
DB_DATABASE=flot
DB_USERNAME=postgres
DB_PASSWORD=ggg
DB_CONNECTION=pgsql


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire