1

昨天我在我的服务器上成功部署。但是今天我收到以下错误:

From github.com:
 * branch            master     -> FETCH_HEAD
Already up-to-date.
Loading composer repositories with package information
Installing dependencies from lock file
Nothing to install or update
Generating autoload files
> php artisan clear-compiled
> php artisan optimize
Generating optimized class loader
Compiling common classes


  [PDOException]                                                                          
  SQLSTATE[HY000] [1045] Access denied for user 'forge'@'localhost' (using password: NO)  

我也可以 ssh 进入我的服务器,我也设置了我的 ssh 密钥。

4

1 回答 1

0

我知道已经晚了,也许对其他人仍然有用。问题是你没有设置你的 .env 文件。

您可能正在使用 forge,请转到 Forge 服务器页面中的 Environment 选项卡;点击“编辑环境”

将旧的 .env 文件粘贴到那里。确保您使用正确的数据库设置:

DB_HOST=localhost
DB_DATABASE=yourdatabase_name
DB_USERNAME=yourSQLuserName
DB_PASSWORD=yourpassword

这些在您的伪造注册电子邮件中提供。

希望这可以帮助。

于 2016-04-01T22:09:22.920 回答