Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

MichielElshout's avatar

PHP Artisan Migrate leaves blank rule

Hello everybody. Laravel newbie here. Since I changed my job, they want me to learn Laravel. I've been following the Laracasts, but with the database migration, I stumble upon a problem.

The line "php artisan migrate", does not do anything. It leaves a blank rule and then it stops. I assume there is an error. Though I cannot find anything to turn error reporting on, so I can know WHAT the error is.

I've also tried "php artisan migrate:refresh", to no avail. With the "mysql" command, it show (logically) no tables. I really been struggling with this.

If more info is needed, I shall provide it.

There should be a screenshot here.

UPDATE: I tried to go to localhost/phpmyadmin which returned a 404 - not found. It's a valet thing, so I'm going to look into that first.

UPDATE TWO: After a lot, A LOT, trial and error, I managed to get it working. Making the swap to MariaDb allowed me to return error messages. I reinstalled MariaDB, with secure settings. Edited those settings into my .env file and now I'm finally able to migrate. Thanks for the help lads, appriciate it!

0 likes
10 replies
36864's avatar

What's a blank rule? Do you mean an empty line in your console or something else?

Try running php artisan migrate -vvv to run it at maximum verbosity.

Also, check your logs in storage\logs, there might be a clue there.

MichielElshout's avatar

I've checked the storate\logs folder. There's nothing in it. I update the OP with a screen shot. It is indeed an empty line.

36864's avatar

hmm no output at all is a bit weird, especially with verbosity set to max.

Were there any issues at all when you ran composer install?

For general debugging purposes, could you try running php artisan clear-compiled and composer dumpautoload and trying again?

MichielElshout's avatar

There were no errors at all with the tips you provided. I even tried "php artisan config:cache", and rerun it afterwards. Still no luck. At this point I'm considering a complete re-installment.

36864's avatar

It might be worth a shot. Reinstalling laravel shouldn't take you very long at all, and it's not like you'd be losing your work.

Ping back if it doesn't solve anything.

click's avatar

It looks like your migration is still 'running'. Are you able to run any other artisan command like php artisan route:list for example?

And are you able to connect to your database at all with your application? If you can run artisan command try running php artisan tinker and than enter DB::select('SELECT DATABASE()');

MichielElshout's avatar

I can run various artisan command, yes. I typed in "PHP Artisan migrate" yesterday and this morning, it was still "running".

Going to uninstall Mysql and install MariaDB. Perhaps that will do the trick.

Another update. With MariaDB, whenever I try to log in into my database, it returns: "Plugin caching_sha2_password could not be loaded:".

36864's avatar

It's unlikely that swapping mysql for mariadb will solve anything.

Have you tried a fresh laravel install? As in create a new laravel project, run php artisan make:auth, followed by php artisan migrate. If that works, it's likely a problem in your app somewhere. If it doesn't, then look at your infrastructure.

MichielElshout's avatar

It does now return an error message.

"PDOException : SQLSTATE[HY000] [2006] MySQL server has gone away".

Whenever I try to log into my mysql to run it I'll get this error: "Plugin caching_sha2_password could not be loaded".

God, Laravel loves me <3.

Please or to participate in this conversation.