5

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  
2
  • Did you find any solution? Fall in the same issue. Commented Jun 21, 2017 at 14:53
  • no @Serj.by i moved to mysql let me know if you find the solution Commented Jun 22, 2017 at 9:24

3 Answers 3

6

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

Sign up to request clarification or add additional context in comments.

Comments

1

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

Thanks!

Comments

1

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'),

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.