Category: Laravel, Laravel, MySQL, MySQL

I've been writing an artisan command to import data from a remote MySQL database. To start a new SSH tunnel, run the following command: ssh -i./path/to/id_rsa \ root@111.222.333.444 This SSH command was new to me, so I want to describe it in full detail.

-N describes we don't want to execute any remote commands, we just want the port forwarding.

As soon as you stop this command, the SSH tunnel will be closed and you can no longer reach the external database.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners