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

前端 未结 29 1818
爱一瞬间的悲伤
爱一瞬间的悲伤 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:31

    i using laravel 5.* i figure i have a file call .env in the root of the project that look something like this:

    APP_ENV=local
    APP_DEBUG=true
    APP_KEY=SomeRandomString
    
    DB_HOST=localhost
    DB_DATABASE=homestead
    DB_USERNAME=homestead
    DB_PASSWORD=secret
    
    CACHE_DRIVER=file
    SESSION_DRIVER=file
    QUEUE_DRIVER=sync
    
    MAIL_DRIVER=smtp
    MAIL_HOST=mailtrap.io
    MAIL_PORT=2525
    MAIL_USERNAME=null
    MAIL_PASSWORD=null
    MAIL_ENCRYPTION=null
    

    And that was over writing the bd configuration so you can wheather deleted those config vars so laravel take the configuration under /config or set up your configuration here.

    I did the second and it works for me :)

提交回复
热议问题