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

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

    Got it! Log in as root and grant homestead@localhost the rights to everything.

    From your terminal:

    $ homestead ssh
    
    $ mysql -u root -p
    
    Enter password: secret
    
    mysql> grant all privileges on *.* to 'homestead'@'localhost' identified by 'secret';
    
    Query OK, 0 rows affected (0.00 sec)
    exit
    

    Now homesteads regular user has access to all of your tables, and as such, should be able to run things like migrations.

提交回复
热议问题