I would like to allow my laravel project to connect to a DB which is in EC2 instead of localhost(in my PC). Is it possible or not?
I tried to look up for how to connect. However, I couldnt find it.
original
DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=mydb
DB_USERNAME=root
DB_PASSWORD=
Db info I want to connect
MySQL host:localhost
username:root
password:password
SSH host : xxx.ap-northeast-1.compute.amazonaws.com
ssh USER: ec-2-user
SSH key: ~~~.cer
SSH port: