Laravel Migration Postgres错误

时间:2017-02-02 00:50:53

标签: php database postgresql laravel-5.3 pgadmin

我希望将Laravel与postgres数据库连接起来。

我跑的时候

php artisan migrate

它给了我这个错误。

[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  

3 个答案:

答案 0 :(得分:0)

请检查您是否输入了pgsql数据库的正确凭据。

谢谢!

答案 1 :(得分:0)

检查您的档案:
.env
配置/数据库

您输入了正确的数据

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

'默认' => env(' DB_CONNECTION',' pgsql'),

答案 2 :(得分:0)

对我来说问题是我忘记将端口从3306更改为5432