1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

connecting a local lan mysql database to a webserver mysql database best way

Discussion in 'MySQL' started by xbat, Nov 22, 2013.

  1. #1
    I have a local lan mysql database and I was wondering what the best way to run a query against it is. I want to set this up automatically. The best thing I could think is.

    the lan would push out a csv file automatically then at a certain time it would upload the csv to the webserver through a phpupload script on a cron job.

    Any ideas or suggestions is greatly appreciated.
     
    Solved! View solution.
    xbat, Nov 22, 2013 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    Wait, what? You have a local database, and you want to query that database from the server? Why...?
    Nevermind why, why not just set up a cron-job on the server, and then have that server query your database?
     
    PoPSiCLe, Nov 22, 2013 IP
  3. xbat

    xbat Well-Known Member

    Messages:
    326
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    105
    #3
    Its not my choice its what we have to work with. Everything is setup locally and staying locally.. So thats what I have to work with.
     
    xbat, Nov 22, 2013 IP
  4. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #4
    Tell whomever is in charge the person is an idiot.
    As I understand it, you don't have a db on the external server / are not using said db, and the remote/external site is reading a csv file with whatever values you want to update from the local db? If so, sure, you can do it your way.
     
    PoPSiCLe, Nov 23, 2013 IP
  5. xbat

    xbat Well-Known Member

    Messages:
    326
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    105
    #5

    Now by calling them a idiot doesn't really solve anything. Part of it is my fault because I didn't explain the whole thing either... It comes down to cost and rebuilding the entire system which has to be around 100 gigabytes. Anyways.. The best way I know is with scheduled tasks, cron jobs, and csv's.

    I was thinking of some sort of mysql to mysql without all the extra junk. Thats where I was trying to focus on.
     
    xbat, Nov 23, 2013 IP
  6. #6
    You still need an interface / script between the databases. So the solution you're proposing seems viable.
    Albeit... 100GB? Is this an online system? Sounds... insanely heavy. What kind of data do you have that takes up 100GB?
     
    PoPSiCLe, Nov 24, 2013 IP
  7. xbat

    xbat Well-Known Member

    Messages:
    326
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    105
    #7

    Thanks.. Ahh just records.. and other stuff.
     
    xbat, Dec 2, 2013 IP