Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PHP/MySQL Permissions problem
#6

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
Reply


Messages In This Thread
PHP/MySQL Permissions problem - by hybrid - 2006-02-16, 08:39 AM
PHP/MySQL Permissions problem - by znx - 2006-02-17, 08:54 PM
PHP/MySQL Permissions problem - by hybrid - 2006-02-17, 09:21 PM
PHP/MySQL Permissions problem - by znx - 2006-02-18, 02:57 AM
PHP/MySQL Permissions problem - by hybrid - 2006-02-18, 09:31 AM
PHP/MySQL Permissions problem - by hybrid - 2006-02-18, 09:48 AM
PHP/MySQL Permissions problem - by hybrid - 2006-02-18, 10:50 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)