Announcement

#1 2023-08-08 15:31:24

dsl25
Member
2021-01-22
37

Using a DB hosted at different server?

Hello,

I'm in the process of moving my gallery to a subfolder of an existing domain and host it at another host by creating a A Record at current host with the second server's IP.

This works fine already when having the DB hosted at the second server if it's a normal web host. My idea though is to rather use a Cloud host for backups because it is cheaper and they offer more storage. The problem is those kinds of hosts do not provide DBs in those accounts.

Hence my question here: would it be possible to keep the DB at the current host and the whole gallery only at the second one?

Hope my question is clear enough...

Offline

 

#2 2023-08-08 16:25:36

Katryne
Member
2016-12-03
372

Re: Using a DB hosted at different server?

You could try ...

I did something of the kind, not on purpose. I had an hosting contract by Ionos and I took a second one : same hosting provider, but not the same server. When I moved 3 of my sites to the new contract, I forgot to move the data bases and I forgot to modify the setting in the sites for the data bases.

And the 3 sites (among which one Piwigo) are running correctly like that.

But the hosting provider is the same.


http://photos.katrynou.fr/ v.14.1.0 https://album.chauvigne.info/ v.13.8.0
Système d'exploitation: Linux - Hébergeur 1&1-Ionos PHP: 8.0.28 - MySQL: 5.7.38
Bibliothèque graphique: External ImageMagick 6.9.10-23

Offline

 

#3 2023-08-08 17:03:30

dsl25
Member
2021-01-22
37

Re: Using a DB hosted at different server?

Wow, that sounds incredible! How is that possible?
I cannot try right now because I'll have to move the whole gallery first but will try to create a small test gallery. Thanks!

Offline

 

#4 2023-08-09 02:13:34

erAck
Only trying to help
2015-09-06
2043

Re: Using a DB hosted at different server?

The $conf['db_host'] value can specify any ip:port combination (instead of localhost what you may have). But for that to work the database server's mysql must listen, and you very likely do not want that unless in an internal network.


Running Piwigo at https://erack.net/gallery/

Offline

 

#5 2023-08-09 02:17:38

dsl25
Member
2021-01-22
37

Re: Using a DB hosted at different server?

Oh, I see, many thanks for this.
Although I don't well understand what "listen" stands exactly for a DB, I fully understand that I would not really want this to happen.

Well noted, thanks again!

Offline

 

#6 2023-08-14 20:22:36

BigIsland270972
Member
Norway
2022-03-15
374

Re: Using a DB hosted at different server?

erAck wrote:

The $conf['db_host'] value can specify any ip:port combination (instead of localhost what you may have). But for that to work the database server's mysql must listen, and you very likely do not want that unless in an internal network.

I think you mean the mysql database port has to "listen" on port 3306. This is the default port for mysql so it shouldn't be a problem.. On the other hand you might need to open the port 3306 on the firewall to the database host if it is on a different network.


Piwigo 14.0 | https://fotoarkiv.no | https://foto.arki.vet | http://Bergen.gallery  | http://Ålesund.gallery | http://geiranger.gallery | http://fjord.photos | http://foto.oslo.no
Apache | PHP 8.1 | MariaDB

Offline

 

#7 2023-08-14 21:24:33

erAck
Only trying to help
2015-09-06
2043

Re: Using a DB hosted at different server?

That I mean, it has to be publicly open, which mostly isn't such a good idea as you'll get hammered with connection attempts (a very strong password on the database account is required anyway).


Running Piwigo at https://erack.net/gallery/

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact