正常的解决办法。。

只需将laravel配置文件中的host 127.0.0.1改成localhost就可以:

'mysql' => array(
            'driver'    => 'mysql',
            'host'      => 'localhost',
            'database'  => 'homestead',
            'username'  => 'homestead',
            'password'  => 'secret',
            'charset'   => 'utf8',
            'collation' => 'utf8_unicode_ci',
            'prefix'    => ''

 

 

然后结果是!!!

然后怎么改都不行。。。

可能就是你把本地的url,配成测试环境的url。两者冲突,导致你怎么修改本地的配置文件都没有用。

SQLSTATE[HY000] [2002] No such file or directory

就是我配置本地的路径为yybeta, 实际上是yytest。

相关文章:

  • 2022-12-23
  • 2021-09-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-10
  • 2021-08-23
猜你喜欢
  • 2021-06-26
  • 2022-12-23
  • 2021-11-29
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案