0

I have a Laravel app on my local PC. I want to use a remote database instead of the local DB. I know we can change the host to the other server's IP but in my case I have to access MySQL only through SSH credentials. I only have the SSH user/password.

In Laravel how can I use the SSH user/pass to connect to the MySQL DB from a remote PC?

Possibly the following can be one solution but I don't want to go for this: Laravel MySql DB Connection with SSH

DB server has a dedicated IP but my webserver doesn't have any dedicated IP and is subject to change at any time. I am not allowed to execute any kind of SSH command on remote DB server.

For now I am able to connect to this DB through SQL-Yog using the SSH credentials even without executing the SSH command as suggested in the above mentioned solution. So I wonder if there can be some solution to this in Laravel as well.

Community
  • 1
  • 1
Malik Ahmed Khan Awan
  • 1,920
  • 2
  • 15
  • 15
  • 2
    Have you tried [this](http://stackoverflow.com/a/25495514/1903366)? – lukasgeiter Jan 06 '15 at 11:01
  • I tried the solution from the other thread. that works in my local environment but I am not allowed to login and to execute the SSH command on any of the live servers manually. Also the IP of my web-server is subjected to change at any time. I have edited my question and mentioned why I can not go for that solution. – Malik Ahmed Khan Awan Jan 11 '15 at 10:09

0 Answers0