php网站报错[IlluminateDatabaseQueryException] SQLSTATE[HY000] [1045] Access denied for user

php网站报错[IlluminateDatabaseQueryException] SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using pas sword NO) (SQL select from information_schema.tables where table_schema = 


蓝队云小课堂:

[Illuminate\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\Database\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\QueryException]

SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using pas

sword: NO) (SQL: select * from information_schema.tables where table_schema

= laravel_test1 and table_name = migrations)

 

通常是缓存造成的

在命令行中进入程序根目录,执行下列语句。

php artisan cache:clear

php artisan config:clear

php artisan serve

然后在执行 php artisan migrate

注意:前提是检查完了 .env和config/database.php

公司概况 | 新闻公告 | 常见问题 | 渠道合作 | 联系方式

Copyright © CMCLOUD.COM Rights Reserved.

 增值电信业务经营许可证:A2.B1.B2-20240438 / 琼B2-20240051
琼ICP备2023005963号