No connection could be made because the target machine actively refused it.?
My app working fine but my machine suddenly shutdown when I open again my machine when I try to open my app in browser its showing error
2/2
QueryException in Connection.php line 770:
SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it.
(SQL: select * from `users` where `users`.`id` = 1 limit 1)
my env
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=fresh
DB_USERNAME=root
DB_PASSWORD=
You should give more details as to what you are using like Homestead, Valet, etc and type of system like Mac, Windows, etc. However, if you happen to be using Homestead, change:
I'm using windows 7, laragon server and mysql and when I try to access phpmyadmin its give error
''' #2002 - No connection could be made because the target machine actively refused it. — The server is not responding (or the local server's socket is not correctly configured).'''
This error is occurring because there is no server listening at the hostname and port you assigned. It literally means that the machine exists but that it has no services listening on the specified port . So, no connection can be established. Generally, it happens that something is preventing a connection to the port or hostname. Either there is a firewall blocking the connection or the process that is hosting the service is not listening on that specific port. This may be because it is not running at all or because it is listening on a different port.