Can I create a php script like: $privSQL = "SHOW GRANTS FOR 'paul'@'localhost'"; $priv_result = mysql_query($privSQL) or die("Couldn't Select Priv"); $k=0; for ($i=0;$i<mysql_num_rows($priv_result);$i++){ $p=mysql_result($priv_result,$i,0); echo "$p<br>"; }
to print out the results to the browser.? I tried this but I couldn't get past mysql_query Chris "Paul DuBois" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > At 20:24 -0500 1/8/04, Chris wrote: > >I am just a user (not an administrator) and would like to know what > >privileges I have with my MySQL user account. Is there a SELECT command I > >can construct that will list these privileges? > > Yes, SHOW GRANTS: > > http://www.mysql.com/doc/en/SHOW_GRANTS.html > > Issue a SELECT CURRENT_USER() statement to find out what your > account is, then use the value with SHOW GRANTS: > > mysql> SELECT CURRENT_USER(); > +----------------+ > | CURRENT_USER() | > +----------------+ > | [EMAIL PROTECTED] | > +----------------+ > 1 row in set (0.07 sec) > > mysql> SHOW GRANTS FOR 'paul'@'localhost'; > > > -- > Paul DuBois, MySQL Documentation Team > Madison, Wisconsin, USA > MySQL AB, www.mysql.com > > MySQL Users Conference: April 14-16, 2004 > http://www.mysql.com/uc2004/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]