Laravel迁移不在新数据库上工作

I just uninstalled and installed back again MySQL via brew in Mac OS X High Sierra. I created back a db for my Laravel project, then made sure the name of the db matched the one in the .env, but when running:

php artisan migrate

nothing's happening. I tried also

php artisan migrate -vvv

but I've got the same result: nothing! No output, no errors indicating what might be wrong.

Any indication will be appreciated.

You can clear cache using this commad php artisan cache:clear and then you can use php artisan migrate Try this I hope this will help you!

I had the same issue as you do and in my case I didn't had password set for db user which caused this issue. Try the following:

  • Assign password to the db user using mysqladmin -u YOURDBUSER password 'newpassword'
  • If it still doesn't work after assigning password to the user, try granting that user all permissions (I don't advise this for production use) GRANT ALL PRIVILEGES ON yourDB.* to 'YOURUSER'@'localhost';

Good luck.