Jump to content

Recommended Posts

Hello, I was wondering how to best approach copying table data to another server.

 

I want to be able to loop through all of the table's rows, and add them to the other server's database. But there may be some rows that already exist over on the other server, I would like to update those ones with the new information.

 

I would rather not have to add grants to the other server's database tables. Multiple servers will be running this PHP script. That means there would need be a wild card IP address to connect. It wouldn't be very secure to allow anyone to connect.

 

I am at a loss on how to proceed. Obviously I don't want raw information to be sent through the internet, so I need to do this in a secure way. I was thinking I could just encrypt the information before sending it, but I am unsure of how to send it.

 

If anyone has any suggestions on where to start it would be appreciated.

It is possible, but since this will be running from a lot of different servers, I would need to add GRANTS to allow those servers to connect. So I would most likely end up having to allowing any IP address to connect. It would be a lot easier, but I cannot do it this way.

 

This will be a cron script that will be executed every day.

If it's running through a bunch of scripts, why not push an single point to access the MySQL server, like an API.... where the other scripts call this single (set of) script(s) that update/insert where needed. Then create a separate MySQL user with limited permissions (such as just update/insert) on the single script's IP. That way even if that user got compromised, the least amount of damage could be done.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.