phplaravellaravel-5laravel-artisanartisan-migrate

php artisan migrate stuck at the beginning of the command


[MacOS 10.14.0] When I create a new project (Laravel new blog) Then create a table in MySQL (create database blog) And then update my .env file with the correct userame, password and database.

After creating a project, I will run php artisan migrate But my terminal stays empty, I can type in my terminal. But it won't do anything.

My storage/logs folder is empty.

I have 2 default migrate files in my database/migrations folder.

php migrate list works

What can it be?


Solution

  • After a lot of trial and error, I found out that there was something wrong with my MySQL server. I reinstalled MySQL with brew. The latest version of 8 and the latest version of 5.7.*. Both didn't work, because of the following conflict: Authentication plugin 'caching_sha2_password' cannot be loaded: dlopen(/usr/local/lib/plugin/caching_sha2_password.so, 2): image not found.

    So the whole time, everything in my .env file was correct but my MySQL was broken. I also confirmed that by trying to connect with the app 'Sequel Pro'. And as I thought, it gave me the same conflict.

    How I fixed the problem:

    Good luck! 👍


    EDIT FEBRUARY 26 2019:
    I found a problem with changing the random generated password. I was using MySQL Community Server 5.7.25 and the random generated password was: _>9mxWc9a!0.. When I was trying to change the default password with the command above. I was given the following error:
    -bash: !0: event not found
    If you have the same error as I did or something similar, try the following:

    It should be working now! 😊