PDA

View Full Version : Multiserver setup with mysql-only server


Croydon
1st June 2009, 14:01
I just tried out a multiserver setup where the main host serves all the available things and a second host that is client database-only.
With this setup I recognized a problem.

If you set up a database on a database-only server you always have to enable remote access for the database as you would not be able to use it otherwise.
And as the database is not linked to a website (like it was in ispc2) you cannot automatically determine the "local" ip that is probably used to access the database.

Do you see any possibility to automatically allow access of needed ips to the database without having the client to enable remot access?

The only solution I see is to get all the ip addresses of all website-servers the client has in use and to grant access to those ips even on disabled remote access.

till
2nd June 2009, 11:51
The only solution I see is to get all the ip addresses of all website-servers the client has in use and to grant access to those ips even on disabled remote access.

Yes, either that or add a website select field in the database form that makes it possible to assign a database to a specific site. Then we will have to rewrite the grant mechanism a bit as it will be better to have a (hidden) field in the database table which lists all granted IP's for each DB record as comma separated value because the database server is not able to determine the IP of a website as the website records do not get replicated to him.

Croydon
3rd June 2009, 09:28
Yes, either that or add a website select field in the database form that makes it possible to assign a database to a specific site. Then we will have to rewrite the grant mechanism a bit as it will be better to have a (hidden) field in the database table which lists all granted IP's for each DB record as comma separated value because the database server is not able to determine the IP of a website as the website records do not get replicated to him.

Well yes, but there is one issue I see with this:
multiserver-setup, 1 mainserver, 1 webserver, 1 db server

If a client has 2 websites on 2 different servers (mainserver and db server) and just wants to use one database (on db server) it would be a problem assigning the database to only one website.
And it would be somehow complicated for the client to determine the ip addresses to enter into the remote access field (remote access limitation patch).

till
3rd June 2009, 10:04
Not sure if we should make it that complicated. If he wants to access the database from more then one server he can still enable external access.