Hi Everyone,
I have no background in php or MySql but I’m learning quickly because this has called a halt to my website development. My problem is this:
There are two servers (containing my content)using MySqL. I have the remote ip connection data for one server but not for the 2nd server. I have been refused these details for the 2nd server on the grounds that it is a security issue.
Users of content on my website, register (username and password) on the 2nd server. The first server contains content that requires login (same username/password stored on the other server database). In effect the databases have to link.
I did think of storing a table with authentication details on the first server - i.e. a copy of the registration table on the second server. Thus authentication takes place directly. However, I’ve been told it is not a good idea to have two
tables with the same info for the same purpose in php.
MySql provide a ‘federated engine’ solution for cross server access. Is Federated engine a solution for me given my circumstances i.e. no remote ip server details for the secure server? I have all the other details.
Any ideas would be most welcome. ANF
Do both these servers have to be up to make this site work? Or could you still access a lot of data on server number 1 even though server number 2 isn’t up?
By using a federated engine you are adding a dependency that server 2 must always be up for your service on server 1 to work.
Another thought, if you are denied access to server 2 due to security reasons, are they going to allow server 1 to access server 2?
So depending on how self sufficient the two servers are/you want them to be it could very well be a good idea to have a local copy of the user database on server 2.
On the other hand if both servers must always be up for the site to work and you want to reduce possible administration to a minimum then using a federated engine is a possibility.
It’s hard to say in your specific case, but as it sounds like these two servers are not located on the same site (am I correct) then I think I would use a copy of the table on server 1, just add something in your application that apart from updating both these tables when a new user signs up, something that regularly checks that they are in sync.
Hi,
Thank you for your response. Yes both these servers have to be up to make this site work. One server contains online exams and is hosted by a professional online exam administrator (not under my control). The other server contains the courses also hosted by a company not my own. Users sign up to the register page available on server 2. Users then have access (so I planned) to content on server 1 by loging in to the appropriate box (authenticated against server 2 registration page) and also use the same login details to access exams (located on server 2). I (try to)run an online training business.
I can copy the server 2 site (online exams) onto a different server, but I’m loathe to do this as currently server 2 is customised to online exam environment (security etc).
The online exam server (server 2) is gauranteed to be running all of the time. If I add in login details for course access (on server 1), server 2 (where registration and login details are stored) must always be on. It is the fact that login authentication takes place on server 2 (online exams) in order for access to server 1 content, which means the databases must link.
With regards to allowing server 1 to access server 2, the folks running server 2 (online exams) will not allow me a remote ip connection to server 2. I guess this means … trouble! I was hoping federated engine would help because I have only seen one ip address in sample code used for set up of federated engine which I hoped would be the code for server 1 (courses). Now this seems less likely. Perhaps I can use federated engine to access server 1 (fill out a table of user details) from server 2, because at least I have server 1 remote access details. I will have to check this with server 2 company.
Storing a copy of the user login table on Server 1 (courses) I thought might be an answer and I do have the remote ip details for server 1 (courses). However, I’ve been told, it is not a good idea to have two tables with the same function for one site (even when this site is spread beteween two independent servers, geographically distant from each other and run by two different companies - joined only by shared login details). Is this correct in your opinion?
Best regards
ANF