-3

I am using WAMP server on Windows 10. I'm new to Laravel and I have this error :

SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES) (SQL: select * from nice_actions)

Here is the MySQL in config/database.php

'mysql' => [
    'driver' => 'mysql',
    'host' => env('DB_HOST', '127.0.0.1'),
    'port' => env('DB_PORT', '3306'),
    'database' => env('DB_DATABASE', 'laravel'),
    'username' => env('DB_USERNAME', 'root'),
    'password' => env('DB_PASSWORD', ''),
    'unix_socket' => env('DB_SOCKET', ''),
    'charset' => 'utf8mb4',
    'collation' => 'utf8mb4_unicode_ci',
    'prefix' => '',
    'strict' => true,
    'engine' => null,
],

and in .env file I have this:

DB_CONNECTION=mysql 
DB_HOST = 127.0.0.1 
DB_PORT=3306 
DB_DATABASE=laravel 
DB_USERNAME=root 
DB_PASSWORD=

Any help will be appreciated. Thank you.

chanafdo
  • 4,347
  • 2
  • 25
  • 40
eddy1010
  • 5
  • 4

1 Answers1

1

try to run php artisan config:cache

Bara' ayyash
  • 1,733
  • 1
  • 12
  • 23