Latest

Thursday, July 6, 2017

Connecting phpMyAdmin in XAMPP with Laravel project

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,
    
    ],
    


Source

No comments:

Post a Comment

Adbox