syntax to revoke
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]
Re: syntax to revoke
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
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
--- 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
--- 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: Problem on creating root password
--- Chris [EMAIL PROTECTED] wrote: Retried as follows; [EMAIL PROTECTED] ~]# mysqladmin -u root --password mypassword Enter password: Typing either mypassword or YES prompted; mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: YES)' * end * That is asking for your *old* password. I did not create any password before. This is a new installation. I'm tuning it. 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]
Re: Problem on creating root password
--- Chris [EMAIL PROTECTED] wrote: - snip - Try this: mysqladmin -u root password xyz That will change your password to 'xyz'. Before received this email I tried; [EMAIL PROTECTED] ~]# mysqladmin -u root -p mysqladmin Ver 8.41 Distrib 4.1.20, for redhat-linux-gnu on x86_64 Copyright (C) 2000 MySQL AB MySQL Finland AB TCX DataKonsult AB This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL license Administration program for the mysqld daemon. Usage: mysqladmin [OPTIONS] command command -c, --count=# Number of iterations to make. This works with -i (--sleep) only. -#, --debug[=name] Output debug log. Often this is 'd:t:o,filename'. -f, --force Don't ask for confirmation on drop database; with multiple commands, continue even if an error occurs. -C, --compress Use compression in server/client protocol. --character-sets-dir=name Directory where character sets are. --default-character-set=name Set the default character set. -?, --help Display this help and exit. -h, --host=name Connect to host. -p, --password[=name] . . . [EMAIL PROTECTED] ~]# [EMAIL PROTECTED] ~]# mysqladmin -u root password xyz mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: NO)' * end * 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: Problem on creating root password
--- Chris [EMAIL PROTECTED] wrote: - snip - So you *have* set the root password before. From your previous emails: # mysqladmin -u root password yourrootsqlpassword That set the password to yourrootsqlpassword. If you need to reset it, see documentation: http://dev.mysql.com/doc/refman/4.1/en/resetting-permissions.html I tried learning resetting the password according to above URL. I can't find set command on this box. I don't know which package provides it so finally I surrendered. As a final recourse, remove re-install mysql from your server. If you have no data, then that might be the quickest easiest. I have no data as this is a new installation for learning. # yum groupremove mysql It went throught w/o complaint. # yum install mysql mysql-devel mysql-server Also went through w/o complaint # nano /etc/init.d/mysqld changed; restart(){ stop start } *end* to; restart(){ stop sleep 3 start } *end* # chkconfig --levels 235 mysqld on No complaint # /etc/init.d/mysqld start Starting MySQL: [ OK ] # netstat -tap tcp0 0 *:mysql *:* . *end* # mysqladmin -u root password myrootpassword mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: NO)' *end* Still the same B.R. satimis 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]