Laravel can’t connect to mysql

It seems your MySQL connection is not configured correctly.
Kindly check your MySQL configuration in your .env file.
You can find .env file in root directory of Laravel.

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=Your_database_name
DB_USERNAME=Your_database_username
DB_PASSWORD=Your_database_password

Leave a Reply

Your email address will not be published. Required fields are marked *