One database to different hosting services

Started by Elev8, Nov 17, 2022, 02:38 AM

Previous topic - Next topic

Elev8Topic starter

I have web hosting where the forum placed, there is its own database, there is also hosting where the game launcher placed, you need to make it so that you can log in from one login and password to both the forum and the launcher, but at the same time the launcher and the forum are on different hosting,
how can this be done?
  •  

autorenta

If this is shared hosting, then most likely it will not work in any way to give external access to the database or use replication, but you can, for example, pull the API in another place when logging in in one place. Or connect via a bicycle HTTP tunnel, as some advanced MySQL clients are able to do.

Now, even within the framework of a single "hosting", many projects are switching to a micro-service architecture, although not directly into the DB lying next to it, but by referring to the service, which is already climbing into the database.
Moreover, not the whole database is needed here, but only one table. That is, the code is written in half an hour.
On the file_get_contents client, on the server the same code as with normal authorization, but returns true instead of Location.
  •  

IVKH

Is there a need for such an association? This will be a serious blow to security, in the event of a hаcker attack, two accounts may suffer at the same time. I don't think it makes sense to combine them. What can be saved here? A little time and add comfort? Is it worth lowering the protection level for this?
  •  

ksparks

Create another SQL user, specify the host, username and password in the settings of the second site.
More detailed information can be obtained from the support service of your hosting, (SQL operator) t k additional permissions may be required to connect from a third-party Ip (and /or account).
  •