我已经在 database.php 文件中正确指定了配置。
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', 'localhost'),
'database' => env('DB_DATABASE', 'laravel5'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', 'abc123'),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'strict' => false,
],
当我在控制台上运行它时
php artisan migrate
它给出了错误 Access denied for user 'homestead'@'localhost' (using password: YES)'
为什么会出现此错误,解决方案是什么?