Laravel正在向我展示“拒绝用户‘住宅’@‘localhost’的访问(使用密码:是的)”。其中一种解决方案是清除存储的缓存和配置缓存,所有这些都使用以下三个命令:
php artisan cache:clear
php artisan config:clear
php artisan config:cache
在php artisan cache:clear
之后,终端说:
Failed to clear cache. Make sure you have the appropriate permissions.
(带红色背景)
执行第二和第三段代码(php artisan config:clear
和php artisan config:cache
)很好!但在输入第一行时仍然会出现错误。有人能解释原因吗?
发布于 2018-09-14 11:00:51
如果data
目录不存在于(storage/framework/cache/data
)下,则会出现此错误。
默认情况下,这个data
目录在新安装/新安装中不存在。
手动创建data
目录(storage/framework/cache
)应修复此问题。
发布于 2019-01-30 13:59:23
尝试删除引导文件夹下的这些缓存文件:
/bootstrap/cache/packages.php
/bootstrap/cache/services.php
/bootstrap/cache/config.php
然后运行php artisan cache:clear
发布于 2020-03-16 21:38:26
呼叫
php artisan config:cache
在此之前
php artisan cache:clear
解决了这个问题。
https://stackoverflow.com/questions/52231248
复制相似问题