Jump to content

Remote database and Security


Leppy

Recommended Posts

Hello,

 

I have a PHP script that uses MySQL for almost all its features. Although, in a few days, I will need to move the PHP script to another server but the MySQL database will remains on its own server. So I will have 2 servers, 1 with the script and 1 with the MySQL database.

 

Now, I could easily create a new mysql user and allowing only the IP address of the server where the script is but is it safe and/or a good practice? And most importantly is it fast? I've used this method in the past and honestly it was slowing down my scripts a inch and I need it to be running as fast as it can be.

 

I've thought about mysql replication but my DB is over 2 GB and there are alot of entries made every 10 minutes and I'd like to safe as much bandwidth as I can. The information I need from the database on my php script is in about 2 table and is less than 1 MB so replicating 2GB+ would not such a good idea, space and bandwidth wise, correct me if I'm wrong though.

 

I've also thought about creating the needed table on a database on the PHP server, but if I need to update it, I'd like it to be updated on the 2 servers without me having to code another script.

 

Perhaps someone here have a suggestion or a thought on what I should do... Any ideas would be greatly appreciated.

 

Regards

Link to comment
Share on other sites

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.