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...

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.