PHP Artisan迁移错误-SQLSTATE [HY000] [2054]

时间:2020-04-02 11:09:10

标签: php laravel laravel-artisan artisan-migrate

当尝试运行PHP artisan migration时,出现以下错误:

explorer.newFile

最后两句话Illuminate ...(Symfony)引起了我的注意,在GitHub中有一个Symfony漏洞通知(在symfony / http-foundation依赖项中发现了潜在的安全漏洞),我承诺按照建议进行升级。我不确定这是否与PHP错误有关。在升级Symfony之前,我没有运行过PHP artisan migration,所以我不能说它在运行之前。我确实在寻找答案,但是尝试的结果无法正常工作,例如添加AppServiceProvider,其他结果已经过时了。

我可以使用.env凭据连接到MySQL,而不会出现问题。


  SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client (SQL: select * from information_schema.tables where table_schema = Famijam and table_name = migrations and table_type = 'BASE TABLE')

 at vendor/laravel/framework/src/Illuminate/Database/Connection.php:669
    665|         // If an exception occurs when attempting to run a query, we'll format the error
    666|         // message to include the bindings with SQL, which will make this exception a
    667|         // lot more helpful to the developer instead of just the database's errors.
    668|         catch (Exception $e) {
  > 669|             throw new QueryException(
    670|                 $query, $this->prepareBindings($bindings), $e
    671|             );
    672|         }
    673| 

      +34 vendor frames 
  35  artisan:37
      Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

REPO,如果需要其他信息,我错过了这里-https://github.com/PT-83/FamiJam

关于如何解决此错误的任何想法?

0 个答案:

没有答案