php - Laravel & phpMyAdmin - pdoexception no connection could be made because the target machine actively refused it -
i'm using laravel 5.2 , phpmyadmin (which i'm running through instantwordpress) , when try migrate database error message command line:
[pdoexception] sqlstate[hy000] [2002] no connection made because target machine actively refused
this .env file looks like:
app_env=local app_debug=true app_key=base64:ibh/yugaxtc2a2rrd7a9ve5io7abpxlyfjuflyfnrfa= app_url=http://localhost db_connection=mysql db_host=localhost db_port=3306 db_database=micedb db_username=roo db_password=roo cache_driver=file session_driver=file queue_driver=sync
then, when @ app in browser have landing page though initial migrate has worked there's nothing in database , when try register error message , stack trace.
in config->database
'mysql' => [ 'driver' => 'mysql', 'host' => env('db_host', 'localhost'), 'port' => env('db_port', '3306'), 'database' => env('db_database', 'dbname'), 'username' => env('db_username', 'root'), 'password' => env('db_password', ''), 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'strict' => false, 'engine' => null, ],
in .env file :
db_host=localhost db_port=3306 db_database=dbname db_username=root db_password=
close laravel application server , restart again clearing cache.
php artisan serve
try this. luck!
Comments
Post a Comment