【问题标题】:Laravel Migration Postgres errorLaravel 迁移 Postgres 错误
【发布时间】:2017-06-18 22:52:11
【问题描述】:

您好,我想将 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  

【问题讨论】:

  • 您找到解决方案了吗?属于同一个问题。
  • no @Serj.by 我搬到了 mysql,如果你找到解决方案,请告诉我

标签: php database postgresql laravel-5.3 pgadmin


【解决方案1】:

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

【讨论】:

    【解决方案2】:

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

    谢谢!

    【讨论】:

      【解决方案3】:

      检查您的文件:
      .env
      config/database

      您是否输入了正确的数据

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

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

      【讨论】:

        猜你喜欢
        • 2018-10-15
        • 1970-01-01
        • 1970-01-01
        • 2018-06-05
        • 2018-01-14
        • 1970-01-01
        • 2014-06-10
        • 2015-12-19
        相关资源
        最近更新 更多