So confused o_O !
OK, so I revoked everything again and built a really small script just to test to see if it was a bug in the other code:
Code:
<?php
$conn = mysql_connect(localhost, "pkbetauser", "xxxx");
$connectto = "pkbeta";
mysql_select_db("pkbeta", $conn) or die (mysql_error());
$sql = "select `id`, `shortname` from `romwypk_featurepages`;";
$query = mysql_query($sql, $conn) or die (mysql_error());
print_r(mysql_fetch_array($query));
?>
After granting usage:
Code:
mysql> grant usage on pkbeta.* to 'pkbetauser'@'localhost' identified by 'xxxxx';
Query OK, 0 rows affected (0.00 sec)
it fails with Access denied for user 'pkbetauser'@'localhost' to database 'pkbeta'.
On the remote server:
Code:
<?php
$conn = mysql_connect("mysql", "aurora", "xxxx");
$connectto = "aurora";
mysql_select_db("aurora", $conn) or die (mysql_error());
$sql = "select `id`, `shortname` from `romwypk_featurepages`;";
$query = mysql_query($sql, $conn) or die (mysql_error());
print_r(mysql_fetch_array($query));
?>
Note that this works and displays as [/url][url=http://dhost.info/aurora/romwy/testdbdhost.php]http://dhost.info/aurora/romwy/testdbdhost.php.
So why does this test work, but my main code fail?
EDIT: According to the MySQL manual:
Quote:USAGE: Synonym for