FULL STACK DEV
FULL STACK DEV

Reputation: 15971

Laravel Migration Postgres error

HI i want to connect Laravel with postgres database.

when i run

php artisan migrate

it gives me this error.

[Illuminate\Database\QueryException]                                                                                                                                                    
SQLSTATE[08006] [7] expected authentication request from server, but received J (SQL: select * from information_schema.tables where table_schema = public and table_name = migrations)  



[Doctrine\DBAL\Driver\PDOException]                                              
SQLSTATE[08006] [7] expected authentication request from server, but received J  

Upvotes: 5

Views: 4085

Answers (3)

Carlos Leyan
Carlos Leyan

Reputation: 61

To me the problem was that I forget to change the port from 3306 to 5432

Upvotes: 6

Muchtarpr
Muchtarpr

Reputation: 97

check your file on :
.env
config/database

did you type correct data for :

DB_CONNECTION=
DB_HOST=
DB_PORT=
DB_DATABASE=
DB_USERNAME=
DB_PASSWORD=

and

'default' => env('DB_CONNECTION', 'pgsql'),

Upvotes: 1

vivek k
vivek k

Reputation: 31

Please check that you have entered correct credentials for the pgsql database.

Thanks!

Upvotes: 1

Related Questions