Re: syntax to revoke

2007-06-12 Thread Stephen Liu
--- Baron Schwartz <[EMAIL PROTECTED]> wrote:

> Stephen Liu wrote:
> >>  If you want to 
> >> get rid of the user entirely, use DROP USER.
> > 
> > Could you please explain in more detail???  Where shall I add "DROP
> > USER"
> 
> The manual always explains the full syntax (http://dev.mysql.com/),

Whether you meant;

MySQL 5.0 Reference Manual
http://dev.mysql.com/doc/refman/5.0/en/index.html
Chapter 13. SQL Statement Syntax
http://dev.mysql.com/doc/refman/5.0/en/sql-syntax.html
???

Tks


> but in brief,
> 
> DROP USER 'vmailuser'@'localhost';
> 
> will remove the user if you wish.

Noted with tks.


Stephen

Send instant messages to your online friends http://uk.messenger.yahoo.com 

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: syntax to revoke

2007-06-12 Thread Baron Schwartz

Stephen Liu wrote:
 If you want to 
get rid of the user entirely, use DROP USER.


Could you please explain in more detail???  Where shall I add "DROP
USER"


The manual always explains the full syntax (http://dev.mysql.com/), but in 
brief,

DROP USER 'vmailuser'@'localhost';

will remove the user if you wish.

Baron

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: syntax to revoke

2007-06-12 Thread Stephen Liu
--- Baron Schwartz <[EMAIL PROTECTED]> wrote:

> OK, the privileges are gone.  USAGE is a synonym for "no privileges."

Noted with tks.


>  If you want to 
> get rid of the user entirely, use DROP USER.

Could you please explain in more detail???  Where shall I add "DROP
USER"


> > To safe guard, it would be better to run 'FLUSH PRIVELEGES'.
> > 
> > Can I re-run
> > REVOKE SELECT, INSERT, UPDATE, DELETE ON test.* FROM
> > 'vmailuser'@'localhost';
> > 
> > then
> > 
> > FLUSH PRIVELEGES;
> 
> Yes.  I think on this recent a version, it will have no effect, but
> will not harm anything.

Noted with tks.


B.R.
Stephen


Send instant messages to your online friends http://uk.messenger.yahoo.com 

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: syntax to revoke

2007-06-12 Thread Baron Schwartz

Stephen Liu wrote:

mysql> SHOW GRANTS FOR 'vmailuser'@'localhost';
+--+
| Grants for [EMAIL PROTECTED]   
   |

+--+
| GRANT USAGE ON *.* TO 'vmailuser'@'localhost' IDENTIFIED BY PASSWORD
'*A0F874BC7F54EE086FCE60A37CE7887D8B31086B' | 
+--+


OK, the privileges are gone.  USAGE is a synonym for "no privileges."  If you want to 
get rid of the user entirely, use DROP USER.



To safe guard, it would be better to run 'FLUSH PRIVELEGES'.

Can I re-run
REVOKE SELECT, INSERT, UPDATE, DELETE ON test.* FROM
'vmailuser'@'localhost';

then

FLUSH PRIVELEGES;


Yes.  I think on this recent a version, it will have no effect, but will not 
harm anything.

Cheers
Baron

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: syntax to revoke

2007-06-12 Thread Stephen Liu
Hi Baron,


> > I suppose it has been done ???
> 
> Yes, but you can check with SHOW GRANTS FOR 'vmailuser'@'localhost'
> to be sure.  


mysql> SHOW GRANTS FOR 'vmailuser'@'localhost';
+--+
| Grants for [EMAIL PROTECTED]   
   |
+--+
| GRANT USAGE ON *.* TO 'vmailuser'@'localhost' IDENTIFIED BY PASSWORD
'*A0F874BC7F54EE086FCE60A37CE7887D8B31086B' | 
+--+
1 row in set (0.00 sec)
* end *

> If you 
> are running an older version of MySQL you may also need to run FLUSH
> PRIVELEGES.  Check 
> the manual for the versions where this is necessary.


I'm running Mysql version;

$ mysql --version
mysql  Ver 14.12 Distrib 5.0.24a, for unknown-openbsd4.0 (x86_64) using
readline 4.3


To safe guard, it would be better to run 'FLUSH PRIVELEGES'.

Can I re-run
REVOKE SELECT, INSERT, UPDATE, DELETE ON test.* FROM
'vmailuser'@'localhost';

then

FLUSH PRIVELEGES;
???

Tks.


B.R.
Stephen

Send instant messages to your online friends http://uk.messenger.yahoo.com 

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: syntax to revoke

2007-06-12 Thread Baron Schwartz

Hi,

Stephen Liu wrote:

Hi Baron,


Tks for your advice.



To undo this GRANT, run

REVOKE SELECT, INSERT, UPDATE, DELETE ON test.* FROM
'vmailuser'@'localhost';


mysql> REVOKE SELECT, INSERT, UPDATE, DELETE ON test.* FROM
'vmailuser'@'localhost';
Query OK, 0 rows affected (0.00 sec)

mysql> 


I suppose it has been done ???


Yes, but you can check with SHOW GRANTS FOR 'vmailuser'@'localhost' to be sure.  If you 
are running an older version of MySQL you may also need to run FLUSH PRIVELEGES.  Check 
the manual for the versions where this is necessary.


Baron

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: syntax to revoke

2007-06-12 Thread Stephen Liu
Hi Baron,


Tks for your advice.


> To undo this GRANT, run
> 
> REVOKE SELECT, INSERT, UPDATE, DELETE ON test.* FROM
> 'vmailuser'@'localhost';

mysql> REVOKE SELECT, INSERT, UPDATE, DELETE ON test.* FROM
'vmailuser'@'localhost';
Query OK, 0 rows affected (0.00 sec)

mysql> 

I suppose it has been done ???


B.R.
Stephen

Send instant messages to your online friends http://uk.messenger.yahoo.com 

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: syntax to revoke

2007-06-12 Thread Baron Schwartz

Hi Stephen,

Stephen Liu wrote:

Hi folks,


OpenBSD 4.0 x86_64
Mysql
Postfix_2.4.3


After running following command;

mysql> GRANT SELECT, INSERT, UPDATE, DELETE ON test.* TO
'vmailuser'@'localhost' IDENTIFIED BY 'password123';
Query OK, 0 rows affected (0.00 sec)


I found I made a mistake to run it. I need to revoke the GRANT given to
vmailuser to test database.


I found on;
13.5.1.5. REVOKE Syntax
http://dev.mysql.com/doc/refman/5.0/en/revoke.html

The syntax;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM user [, user]

but can't resolve whether retaining the 1st 'user'
and
replace [,  user] with [, vmailuser]???


To undo this GRANT, run

REVOKE SELECT, INSERT, UPDATE, DELETE ON test.* FROM 'vmailuser'@'localhost';

Baron

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



syntax to revoke

2007-06-12 Thread Stephen Liu
Hi folks,


OpenBSD 4.0 x86_64
Mysql
Postfix_2.4.3


After running following command;

mysql> GRANT SELECT, INSERT, UPDATE, DELETE ON test.* TO
'vmailuser'@'localhost' IDENTIFIED BY 'password123';
Query OK, 0 rows affected (0.00 sec)


I found I made a mistake to run it. I need to revoke the GRANT given to
vmailuser to test database.


I found on;
13.5.1.5. REVOKE Syntax
http://dev.mysql.com/doc/refman/5.0/en/revoke.html

The syntax;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM user [, user]

but can't resolve whether retaining the 1st 'user'
and
replace [,  user] with [, vmailuser]???

Please shed me some light.  TIA


B.R.
Stephen Liu


Send instant messages to your online friends http://uk.messenger.yahoo.com 

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]