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.

Fetch Data From Database Hosted on Other Server

Discussion in 'MySQL' started by Akash Mishra, May 15, 2013.

  1. #1
    Hi All,
    My website is hosted on us based server and I want to develop an application which can fetch data from mysql db of another website, which is hosted on other server. How can I do this.
     
    Akash Mishra, May 15, 2013 IP
  2. smellocity

    smellocity Active Member

    Messages:
    155
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    88
    #2
    if you dont have access to the database. you cant.
     
    smellocity, May 15, 2013 IP
  3. Airknight

    Airknight Active Member

    Messages:
    91
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    50
    #3
    I'm not sure I understand what you are trying to do. Do you have access to those databases ? If you do

    enable your MySQL server for remote access

    grant all privileges on *.* to USERBLOGIN@000.000.000.000 identified by "USERBPASSWORD";
    Code (markup):
    *.* (Means all databases)
    User B login must be replaced by your login on server B
    Replace 000.000... by the IP
    and UserBpassword by your password on server B
     
    Airknight, May 15, 2013 IP
  4. Akash Mishra

    Akash Mishra Greenhorn

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #4
    thanks you all for the help...!!!:)
     
    Akash Mishra, Jun 7, 2013 IP
  5. scottlpool2003

    scottlpool2003 Well-Known Member

    Messages:
    1,708
    Likes Received:
    49
    Best Answers:
    9
    Trophy Points:
    150
    #5
    Just be cautious opening up your server to remote SQL/MySQL connections it can open up a whole host of security concerns.
     
    scottlpool2003, Jun 7, 2013 IP
  6. macfraser

    macfraser Member

    Messages:
    81
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #6
    You can also just do a mysql dump then copy the file over and import it. It is more secure than opening up your database.
     
    macfraser, Jul 4, 2013 IP