Re: Newbie: Can't get GRANT to work
Thank you, Carl and Chris, for helping me with this problem. Something else must be happening, as I still can't log in: www:~ # mysql -u zope -p Enter password: ERROR 1045: Access denied for user: 'zope@localhost' (Using password: YES) www:~ # Mysqlaccess shows: www:~ # mysqlaccess -u zope -d zope -P Could not open outputfile ~/mysqlaccess.log for debugging-info mysqlaccess Version 2.06, 20 Dec 2000 Password for MySQL superuser : Access-rights for USER 'zope', from HOST 'localhost', to DB 'zope' +-+---+ +-+---+ | Select_priv | N | | Shutdown_priv | N | | Insert_priv | N | | Process_priv| N | | Update_priv | N | | File_priv | N | | Delete_priv | N | | Grant_priv | N | | Create_priv | N | | References_priv | N | | Drop_priv | N | | Index_priv | N | | Reload_priv | N | | Alter_priv | N | +-+---+ +-+---+ BEWARE: Everybody can access your DB as user `zope' from host `localhost' : WITHOUT supplying a password. : Be very careful about it!! BEWARE: Accessing the db as an anonymous user. : Your username has no relevance The following rules are used: db: 'No matching rule' host : 'Not processed: host-field is not empty in db-table.' user : 'localhost','','','N','N','N','N','N','N','N','N','N','N','N','N','N','N' www:~ # Any suggestions for further diagnostics and solutions? Thanks, again, everybody, for your help. -Kevin Zembower Carl Troein [EMAIL PROTECTED] 11/14/01 02:47PM KEVIN ZEMBOWER writes: mysql grant all on zope.* to zope identified by xxx; Query OK, 0 rows affected (0.00 sec) mysql select * from user where user=zope; | %| zope | 34577362486f3680 | N | N | N | N | N | N | N | N | N| N | N | N | N | N | My questions: 1. Why didn't this work? It did work. You granted all privileges on the database zope, but the privileges in the 'user' table are the _global_ privileges. Those are what you set with GRANT ... ON *.* ... To see the ones you set, have a look in the table 'db'. 2. If it had worked, would I have seen something other than zero records affected in response to the GRANT command? For some reason you always get a 0 back from GRANT. There's probably some internal reason for this. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Newbie: Can't get GRANT to work
http://www.mysql.com/doc/P/r/Privilege_changes.html If you modify the grant tables manually (using INSERT, UPDATE, etc.), you should execute a FLUSH PRIVILEGES statement or run mysqladmin flush-privileges or mysqladmin reload to tell the server to reload the grant tables. Otherwise your changes will have no effect until you restart the server. If you change the grant tables manually but forget to reload the privileges, you will be wondering why your changes don't seem to make any difference! HTH, -- coop On Wed, 2001-11-14 at 13:29, KEVIN ZEMBOWER wrote: I'm certain I'm making a simple mistake here, but can't find it. Here's what I'm executing, using mysql 3.23.43-log: [I'm root when I run this] #mysql -p mysql mysql grant all on zope.* to zope identified by xxx; Query OK, 0 rows affected (0.00 sec) mysql select * from user where user=zope; +--+--+--+-+-+-+-+-+---+-+---+--+---++-+++ | Host | User | password | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv | +--+--+--+-+-+-+-+-+---+-+---+--+---++-+++ | %| zope | 34577362486f3680 | N | N | N | N | N | N | N | N | N| N | N | N | N | N | +--+--+--+-+-+-+-+-+---+-+---+--+---++-+++ 1 row in set (0.00 sec) mysql My questions: 1. Why didn't this work? 2. If it had worked, would I have seen something other than zero records affected in response to the GRANT command? I search the recent messages on GRANT and found the suggestion to run mysql_fix_privilege_tables. It seemed to run correctly, but didn't change anything. Thanks for helping this newbie. -Kevin Zembower - E. Kevin Zembower Unix Administrator Johns Hopkins University/Center for Communications Programs 111 Market Place, Suite 310 Baltimore, MD 21202 410-659-6139 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Newbie: Can't get GRANT to work
KEVIN ZEMBOWER writes: mysql grant all on zope.* to zope identified by xxx; Query OK, 0 rows affected (0.00 sec) mysql select * from user where user=zope; | %| zope | 34577362486f3680 | N | N | N | N | N | N | N | N | N| N | N | N | N | N | My questions: 1. Why didn't this work? It did work. You granted all privileges on the database zope, but the privileges in the 'user' table are the _global_ privileges. Those are what you set with GRANT ... ON *.* ... To see the ones you set, have a look in the table 'db'. 2. If it had worked, would I have seen something other than zero records affected in response to the GRANT command? For some reason you always get a 0 back from GRANT. There's probably some internal reason for this. //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Newbie: Can't get GRANT to work
Yes, I've read this a number of times too. I've also read the section that says If you use GRANT, you don't need to use FLUSH PRIVILEGES. The way that I read this is that GRANT is the automatic method, not requiring FLUSH PRIVILEGES, whereas modifying the tables directly, using INSERT, UPDATE, etc. does require the use of FLUSH PRIVILEGES. Here's the proof: www:~ # mysql -p mysql mysql grant all on zope.* to zope identified by ccpzope; Query OK, 0 rows affected (0.01 sec) mysql FLUSH PRIVILEGES; Query OK, 0 rows affected (0.02 sec) mysql select * from user where user=zope; +--+--+--+-+-+-+-+-+---+-+---+--+---++-+++ | Host | User | password | Select_priv | Insert_priv | Update_priv | |Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Process_priv | |File_priv | Grant_priv | References_priv | Index_priv | Alter_priv | +--+--+--+-+-+-+-+-+---+-+---+--+---++-+++ | %| zope | 34577362486f3680 | N | N | N | N | | N | N | N | N | N| N || N | N | N | N | +--+--+--+-+-+-+-+-+---+-+---+--+---++-+++ 1 row in set (0.01 sec) mysql Thanks for trying to give me a hand. I'm open to other suggestions. -Kevin Zembower Chris Cooper [EMAIL PROTECTED] 11/14/01 02:46PM http://www.mysql.com/doc/P/r/Privilege_changes.html If you modify the grant tables manually (using INSERT, UPDATE, etc.), you should execute a FLUSH PRIVILEGES statement or run mysqladmin flush-privileges or mysqladmin reload to tell the server to reload the grant tables. Otherwise your changes will have no effect until you restart the server. If you change the grant tables manually but forget to reload the privileges, you will be wondering why your changes don't seem to make any difference! HTH, -- coop On Wed, 2001-11-14 at 13:29, KEVIN ZEMBOWER wrote: I'm certain I'm making a simple mistake here, but can't find it. Here's what I'm executing, using mysql 3.23.43-log: [I'm root when I run this] #mysql -p mysql mysql grant all on zope.* to zope identified by xxx; Query OK, 0 rows affected (0.00 sec) mysql select * from user where user=zope; +--+--+--+-+-+-+-+-+---+-+---+--+---++-+++ | Host | User | password | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv | +--+--+--+-+-+-+-+-+---+-+---+--+---++-+++ | %| zope | 34577362486f3680 | N | N | N | N | N | N | N | N | N| N | N | N | N | N | +--+--+--+-+-+-+-+-+---+-+---+--+---++-+++ 1 row in set (0.00 sec) mysql My questions: 1. Why didn't this work? 2. If it had worked, would I have seen something other than zero records affected in response to the GRANT command? I search the recent messages on GRANT and found the suggestion to run mysql_fix_privilege_tables. It seemed to run correctly, but didn't change anything. Thanks for helping this newbie. -Kevin Zembower - E. Kevin Zembower Unix Administrator Johns Hopkins University/Center for Communications Programs 111 Market Place, Suite 310 Baltimore, MD 21202 410-659-6139 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -