duanrenzou1619 2018-04-30 07:30
浏览 127

脚本php artisan优化处理post-update-cmd事件,返回错误代码1和laravel 5.4

Hi I work on a macbook and use Xampp and I have a problem on my laravel project 5.4. When I do composer update I had this error:

In Connection.php line 647: SQLSTATE[HY000] [2002] Connection refused (SQL: select * from houses)

In Connector.php line 68: SQLSTATE[HY000] [2002] Connection refused

Script php artisan optimize handling the post-update-cmd event returned with error code 1.

I don't know how to resolve that I check the user of my database it's root, I check my .env in my laravel project the name, user and password are ok, I can access to phpmyadmin, I imported the database file on phpmyadmin. And when I do php artisan serve

I have this error:

In Connection.php line 647: SQLSTATE[HY000] [2002] Connection refused (SQL: select * from houses)

In Connector.php line 68: SQLSTATE[HY000] [2002] Connection refused

But I think it's normal because the composer update didn't worked.

  • 写回答

1条回答 默认 最新

  • dsl36367 2018-04-30 07:52
    关注

    First clear cache if any changes was made in .env:

    php artisan config:cache
    
    评论

报告相同问题?

悬赏问题

  • ¥17 pro*C预编译“闪回查询”报错SCN不能识别
  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?