I have a server in one country, but most visits to my site come from another country (e.g., my server is in Germany but my site users are in the USA). This means that the ping time for my users is slow.
I’m going to buy a server in my users’ country, but I’m not going to move the data from my previous server (for various reasons). My site has to connect to the database to load the content.
Is it possible to make a connection from my new webserver to the database on my current server?
I imagine that it would be something like this.
$dbhost = "I think I should write the ip of the alternative server here";
$dbuser = ....;
$dbpass = ....;
$dbname = ....;
$dbconnection = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname);
Is this correct?