There are precedence rules and these are discussed in the manual. http://dev.mysql.com/doc/mysql/en/Connection_access.html Since you are granting at the database level you will see the changes in the db table and not the user table.
-----Original Message----- From: Cam To: Mysql List Sent: 7/30/04 12:06 PM Subject: Grant problem I'm running the scarab problem reporting system and and trying to grant some privileges to a user and don't understand why it isn't working. I have the following user that I can see in the USER table mysql> select user,host,password,Insert_priv from user where user='scarab' and host='localhost.localdomain'; +--------+-----------------------+------------------+-------------+ | user | host | password | Insert_priv | +--------+-----------------------+------------------+-------------+ | scarab | localhost.localdomain | 6324f94c732accc0 | N | +--------+-----------------------+------------------+-------------+ 1 row in set (0.00 sec) Notice how this user has no insert priv and has a password. If I now give the command mysql> grant all privileges on scarab.* to 'scarab'@'localhost.localdomain' identified by 'secret'; Query OK, 0 rows affected (0.00 sec) Here comes my first question........ Why are there no rows affected? Anyway I query the user table and see that the password has been changed but the privileges have not. mysql> select user,host,password,Insert_priv from user where user='scarab' and host='localhost.localdomain'; +--------+-----------------------+------------------+-------------+ | user | host | password | Insert_priv | +--------+-----------------------+------------------+-------------+ | scarab | localhost.localdomain | 428567f408994404 | N | +--------+-----------------------+------------------+-------------+ 1 row in set (0.00 sec) I've tried several combinations and even 'flush privileges' although the manual says that I don't have to. The complete listing of the table goes something like mysql> select user,host,password,Insert_priv from user; +--------+-----------------------+------------------+-------------+ | user | host | password | Insert_priv | +--------+-----------------------+------------------+-------------+ | root | localhost | | Y | | root | kskLinux | | Y | | | localhost | | N | | | kskLinux | | N | | scarab | localhost | 6324f94c732accc0 | N | | scarab | | | N | | scarab | 127.0.0.1 | | N | | scarab | localhost.localdomain | 428567f408994404 | N | | scarab | % | 6324f94c732accc0 | N | +--------+-----------------------+------------------+-------------+ 9 rows in set (0.03 sec) So now, even though '[EMAIL PROTECTED]' has a password when I login and don't give a password I get in!!!! see below. [EMAIL PROTECTED] root]# mysql -u scarab -h localhost.localdomain -p scarab Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 17 to server version: 4.0.20-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. If I try to give a password it fails. Is there a precidence rule in effect here? I'm so confused. :( what am I doing wrong? Cheers Cam -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]