I am using laravel 5 to implement api in subdomain for example: api.domain.com
I copied the laravel from local to sharing host. In public_html/api folder.
In local eveything works fine, but in server I got this error:
PDOException in Connector.php line 55: SQLSTATE[HY000] [2002] Establishing tcp connections on remote port 3306 has been disabled for security reasons.
When I try to connect database by laravel 5.
What should I do?
Use localhost
instead of 127.0.0.1
in your .env file for DB_HOST
variable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With