Access denied for user 'homestead'@'localhost' (using password: YES)

前端 未结 29 1808
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-27 10:23

I\'m on a Mac OS Yosemite using Laravel 5.0.

While in my local environment, I run php artisan migrate I keep getting :

29条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-27 10:39

    From your question, it seems you are running homestead. In that case, make sure you're running the commands in your VM. Many devs including me often make mistake and run artisan commands outside of VM which the commands will try to connect to our local database accessible through localhost which is different from the database used by homestead. Cd to your Homestead directory and run

    vagrant ssh
    

    then cd into code if that is where you keep your projects and cd into your project and run php artisan migrate again I hope this will help other people.

提交回复
热议问题