【发布时间】:2018-08-10 06:38:01
【问题描述】:
当我尝试运行“php artisan key:generate”时,提示符Screenshot of the error 出现以下错误 实际上我正在不同的笔记本电脑上运行一个 laravel 项目。我在生成密钥时遇到了这个问题。我该如何解决?
Error In Connection.php line 647: SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES) (SQL: select * from information_schema.tables where table_schema = homestead and table_name = permissions) In PDOConnection.php line 47: SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES) In PDOConnection.php line 43: SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES)
【问题讨论】:
-
那是数据库连接错误。您是否更改了 app/config/database.php 中的任何内容?您的用户是否可以从您正在运行 artisan 的计算机访问?
-
k bho solta @Everest tyo .env 文件 ma heru parcha dababase 连接凭据 milayana jasto cha
-
我没有更改 app/config/database.php 中的任何内容。我能够顺利运行其他项目。但我试图在我的电脑上第一次运行这个项目
-
首先你需要运行mysql/数据库服务器。第二部分检查您的数据库凭据并确保它们是正确的。
-
那么您应该更改 app/config/database.php 并为您第一次运行的计算机设置正确的凭据。