I was able to successfully create migrations from Xampp. However when i installed Homestead(vagrant,Virtual Box) and try to associate it with a database and run migrations i am facing
##[PDOException] SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'##
I have literally tried many configurations for .env file and config/database file , none seems to be working. .ENV File
APP_ENV=local
APP_KEY=base64:AxtpwFxTGQ3tkumIu1nkzswrTbuI37BigLGn3meRC6M=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=lara56
DB_USERNAME=root
DB_PASSWORD=
My config/database file
'connections' => [
'sqlite' => [
'driver' => 'sqlite',
'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '',
],
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'lara56'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'strict' => true,
'engine' => null,
],