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

Johnston907's avatar

php artisan migrate issues

Im trying to mimic the laraval 5.4 from scratch video. I have done everything step by step to this point. I have the latest version oh php, composer, laravel, brew, valet, and mysql. I have created a database called blog. i edited the information in my .env, username is root. password is blank. when i get on the command line and cd into my project folder, i run php artisan migrate and absolutely nothing happens at all. i get no response from the terminal even after long periods of time (30 minutes) and i cant type in that terminal window until i press control+c

i cannot get the database to connect to my app and sql.... the tables aren't being created when i run migrate...i've been trying to figure this out all day. this is my very first post ever asking for help.

0 likes
11 replies
Cronix's avatar

is there anything in the /storage/logs/laravel.log file? Can you connect to mysql in another way like Sequel Pro or the commandline, etc?

Can you visit the site in the browser and see the default laravel welcome view?

Johnston907's avatar

yes i can use php artisan serve and connect to localhost in browser to view the laravel welcome page. I can connect to the sql database through command line. Yeah theres a lot of stuff in the storage log file. looks like all of my random attempts at making it work.

Cronix's avatar

delete the laravel.log file, and run the migrations again. Then look at the log file it generated so that you only get the errors pertaining to the migrations. Is there anything useful in there?

MaverickChan's avatar

@Johnston907 , did you install the imap extension? if so , remove it from php.ini.

and what is your php version ? if it is php 7.2 , that won't be a problem.

Johnston907's avatar

when i type php artisan migrate, it doesn't do anything. My command line gets basically frozen. like if i type anything and hit enter its no longer processing anything. kind of like when you start php artisan serve. so nothing pops up in the laravel log file. if i mistype the word migrate, and the "did you mean migrate" box pops up, then that shows in the log file.

Cronix's avatar

What version of mysql? If it's v8, you should downgrade to 5.7.x

Johnston907's avatar

im asssuming... something like... brew services reinstall mysql57

??

Cronix's avatar

I can't answer that for you as I don't use Brew, which is I assume how you installed it? I do all of my dev in homestead.

Johnston907's avatar

okay. the video mentioned homestead. I'm sure i'll check it out later. i know its a virtual machine. i don't know anything about virtual machines.

Please or to participate in this conversation.