Asked by: Muhamed Ahmed
i tried to attach phpMyAdmin in my XAMPP server with my Laravel project and i failed , every time i make :
php artisan migrate
This error occurs:
[PDOException]
SQLSTATE[HY000] [2002] No such file or directory
This is my
.env
file :DB_CONNECTION=mysql DB_HOST=localhost DB_PORT=3306 DB_DATABASE=laravel DB_USERNAME=root DB_PASSWORD=''
This is my
database.php
file :'mysql' => [ 'driver' => 'mysql', 'host' => 'localhost', 'port' => env('DB_PORT', '3306'), 'database' => 'laravel', 'username' => 'root', 'password' => '', 'unix_socket' => '/opt/lampp/var/mysql/mysql.sock', 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', 'prefix' => '', 'strict' => true, 'engine' => null, ],
No comments:
Post a Comment