Use Remote mysql Database?

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

  1. matthewamzn macrumors member

    Jun 29, 2004
    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


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

Share This Page