laravel 5中用户'homestead @ localhost'..的访问被拒绝 [英] Access denied for user 'homestead@localhost' .. in laravel 5

查看:78
本文介绍了laravel 5中用户'homestead @ localhost'..的访问被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用php artisan migration命令在laravel 5中迁移我的数据库. 它给了我一个错误:

I use the command php artisan migrate to migrate my db in laravel 5 .. it gives me an error:

具有消息"SQLSTATE [HY000] [1045]访问的异常"PDOException" 对于用户'homestead'@'localhost'被拒绝(使用密码:是)'

exception 'PDOException' with message 'SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES)'

推荐答案

将来的某个时候.尝试先清除您的配置

Sometime in the future. Try to clear your config first

php artisan config:clear. 

关闭所有终端/cmd窗口,然后重新启动终端/CMD,这应该摆脱错误消息.看看是否可行.

Close all the terminal /cmd windows and then restart terminal/CMD and this should get rid of the error message. See if it works.

这篇关于laravel 5中用户'homestead @ localhost'..的访问被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆