简体   繁体   English

Laravel 迁移 Postgres 错误

[英]Laravel Migration Postgres error

HI i want to connect Laravel with postgres database.嗨,我想将 Laravel 与 postgres 数据库连接。

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  

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

Please check that you have entered correct credentials for the pgsql database.请检查您是否为 pgsql 数据库输入了正确的凭据。

Thanks!谢谢!

check your file on :检查您的文件:
.env .env
config/database配置/数据库

did you type correct data for :您是否输入了正确的数据

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

and

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM