[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 962
  • Last Modified:

How to call a remote localhost?

I have found a program that allows me to convert a Wordpress database (Mysql, on server 1) to a Drupal Database (Mysql (server 2). apparently this program is meant to reside on my local Windows station and call both databases from there.
But both databases are on each server at the localhost. What should the path to reach each look like. Or is this an impossibility at all, can one not call a 'remote localhost'?
Should you want to know more about the program, it resides here: http://superjacent.net/cms/node/509
1 Solution
localhost is the local address of any computer, it is equivalent to the IP address that each computer recognizes as its local address.
If you want to reach a database on a remote computer, you will need the following:
1. the IP address of the remote computer (with which you will replace localhost in your connection string)
2. the port on which the MySQL server can be reached on that computer (3306 by default but it can be something else)
3. that any firewall/proxy that resides between your computer and the remote computer allows your computer to talk to the remote computer using that port

If summary, if you have the control on all the computers, for example if the reside in your intranet, you will be able to open those routes without to much problems. On the other side, if any of the computers is hosted by an ASV, you should immediately forget it as they will never let you do that.
TheoRichelAuthor Commented:
Thank you, that seems clear, though I do not know what ASV stands for.
Muhammad WasifCommented:
Addition to elfe69's suggestions, you have grant permissions on MySQL user to connect the database from remote host.

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now