这个问题在这里已有答案:
当我尝试运行“php artisan key:generate”时,我在promptScreenshot 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)
只需将您系统的数据库配置放在.env文件中即可。像数据库名称用户和密码。