So the website is in the cloud and the mysql server is on your local computer?
Problem connecting laravel with mysql database in xampp on AWS EC2 Ubuntu 20.4
Hi, I am new to laravel and still learning. I am working on ubuntu on aws. I tried to connect my application to the mysql database which I installed with xampp. I am using laravel 8.76.2
I got this error when DB_HOST=localhost in my .env file:
Illuminate\Database\QueryException SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from Contact)
and when I put DB_HOST=127.0.0.1 I got this error:
Illuminate\Database\QueryException SQLSTATE[HY000] [2002] Connection refused (SQL: select * from Contact)
I am running laravel appplication on nginx server on my aws public IP! can anyone help me in this regards?
from the official faq
XAMPP is not meant for production use but only for development environments.
Please or to participate in this conversation.