Laravel migrate DB_PASSWORD does not take effect

The

code is clone directly from git. When you configure the project and execute the database Synchronize command php artisan migrate, you will report an error:

In Connection.php line 664:

  SQLSTATE[HY000] [1045] Access denied for user "homestead"@"localhost" (using password: YES) (SQL: select * from information_schema.tables where table_schema = laravel-shop and
  table_name = migrations)

I found that the password used for the connection is not the password configured in my .env. I tried to cache anything clearly, but it didn"t work (the code that just came down didn"t cache it either). Check that the configuration in the .evn file and the configuration of config/database.php are normal. Please do not hesitate to give me advice.

paste the configuration diagram, database.php (without any modification)

clipboard.png

.env

clipboard.png

Jun.19,2021

you can see if it is the user's permission or something else. You can debug the database parameters passed in with the xdbug tool.


I'm confused. The database connection is user@host,. I forgot to change the host. I always thought I had the wrong password =

.
Menu