Access denied for user 'homestead@localhost' .. in laravel 5

后端 未结 11 2188
甜味超标
甜味超标 2021-02-10 10:01

I use the command php artisan migrate to migrate my db in laravel 5 .. it gives me an error:

exception \'PDOException\' with message \'SQLSTATE[HY000] [10

11条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-10 10:27

    This question was asked several times before .. checkout the best answers I found :

    • Question 1
    • Question 2

    The problems behind this error could be :

    • Your .env file and config/database.php are incorrect.
    • You didn't set the correct unix_socket value in your config file, checkout Question 2.
    • You are trying to run the php artisan migrate:install from your local machine. You should SSH into the VM homestead ssh and run your migrations from there, checkout Question 1.

提交回复
热议问题