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

前端 未结 29 1716
爱一瞬间的悲伤
爱一瞬间的悲伤 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条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-27 10:35

    When you install Homestead, this creates a default "homestead" database in the VM. You should SSH into the VM homestead ssh and run your migrations from there. If you are working locally with no VM, you'll need to create your database manually. By default, the database should be called homestead, the username is homestead and the password is secret.

    check this thread on laracasts or this blog post for more details


    if you are getting

    [PDOException] SQLSTATE[HY000] [2002] No such file or directory
    

    try changing "host" in the /app/config/database.php file from "localhost" to "127.0.0.1" . you can find more details and other fixes here on this thread.

    Also check whether you have specified the correct unix_socket . check this thread .

提交回复
热议问题