My First Day at laravel stuck at database

I was doing and following some tuts on udemy, but the instruction was using SQL lite. he created database.sqlite, and so I created database.mysql, and did the same on the same installation of laravel folder what he has done ↓

But I ended up with an error:

What steps should I follow to move on from here.

“No connection could be made because the target machine actively refused it.”

Are you sure your MySQL server is online, and listening to connections on 127.0.0.1 port 3306, and that there is no firewall rule blocking the connection?

Hi There,

image

Out of stab-it-in-the-darkness…
what happens if you change the connection to look for localhost instead of 127.0.0.1?

1 Like

Tried again got this warning →

well okay, now it connected, but it says there’s no database named laravel.

1 Like

Let me try I will update.

So should I chnaged the database name in .env file?

… i’m going to point you at your own screenshot and say “please read the error information provided to you before asking a web forum what’s wrong.”

1 Like

Yes, I was able to resolve. I got panic it was like any other database installation. Finally created a database in mysql and then changed in .env file, and it seems to be working now.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.