Jump to content

How do i connect to external database in php using SSH in XAMPP?


angel1987

Recommended Posts

I know the regular database connection, but this time i am provided with the SSH details.

 

This guy game me the IP address of the database server to connect and 2 login details.

 

SSH: Username and Password

 

DB: Username and Password

 

And i am using XAMPP for trying out the code.

 

Is there any plugin i need to download for SSH connections?

 

Could you please give me the connection snippet for SSH because i don't really know how to do that, i am also searching elsewhere on internet.

 

Thanks in advance for help...

They're probably using SSH port forwarding.  If you're on Linux you'd have to create a tunnel to that server using autossh.  Tunnel 127.0.0.1:3306 to 3306 on your local machine and then you should be able to connect to MySQL as though it were on your own machine (even though it's not).

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.