Use Remote mysql Database?

Discussion in 'Web Design and Development' started by matthewamzn, Jun 12, 2006.

  1. matthewamzn macrumors member

    Joined:
    Jun 29, 2004
    #1
    I'm trying to retrieve data from a remote mysql database to use in a php page, but I can't connect to it.

    $conn = mysql_connect ("remoteserverip", db_username, db_password)
    or die ('could not connect. ' . mysql_error());
    mysql_select_db (db_name, $conn);

    I'm using the Plesk control panel. I do ssh into the server to create mysqldumps, but I haven't connected in this way before.
     
  2. Coolnat2004 macrumors 6502

    Coolnat2004

    Joined:
    Jan 12, 2005
    #2
    Remote MySQL connections are usually disabled due to the security risk that they pose..
     

Share This Page