Support the ongoing development of Laravel.io →
Configuration Database

I created a project with composer flawlessly BUT artisan is giving me a Error!

I have created i MySql database "Movie" and i want to create a migration with artisan, this is what i do:

This is my database.php file:

'default' => 'mysql',

'mysql' => [ 'driver' => 'mysql', 'host' => env('DB_HOST', 'localhost'), 'database' => env('DB_DATABASE', 'Movies'), 'username' => env('DB_USERNAME', 'root'), 'password' => env('DB_PASSWORD', ''), 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'strict' => false, ]

  1. php artisan make:migration create_movies_table --create="movies"

  2. php artisan migrate

the error: [PDOException]
SQLSTATE[HY000] [2002] No such file or directory

thank you in advance!

Last updated 3 years ago.
0

Sign in to participate in this thread!

PHPverse

Your banner here too?

spoofy spoofy Joined 27 Apr 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.