且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

用户 'root'@'localhost' 的访问被拒绝- Laravel

更新时间:2022-03-30 21:31:27

这对我有用:

php artisan config:clear

即使我更改了 .env 文件中的 config 详细信息,我还是收到了拒绝访问错误.运行上面的命令将清除配置缓存文件,因此 Laravel 将从 .env 文件中读取新数据.

Even though I changed the config details in the .env file, I was getting the Access denied error. Running the above command will clear configuration cache file and hence laravel will read the fresh data from the .env file.