Forum Moderators: open
$link = mysql_connect('localhost', 'root', '');$link2 = mysql_connect('REMOTE IP', 'remote_user', 'password');
mysql_select_db('remote_db', $link2);$query = "SELECT local_db.coords.name FROM local_db.coords
UNION
SELECT coords.name FROM coords";
$result = mysql_query($query) or die("Query failed : $query " . mysql_error());
$line = mysql_fetch_array($result);
The error I'm getting is:
SELECT command denied to user 'remote_user'@'MY_IP_ADDRESS' for table 'coords'
There shouldn't be a problem with SELECT privilege as I can get onto this DB with a local copy of PHPMyAdmin no problem