At 15:15 +1100 1/10/03, Guy Waugh wrote:
>Hi there,
>
>I'm cleaning up MySQL permissions on one of my servers, and I see
>that in the mysql.host table, there are 8 rows. All 8 rows contain
>specific hosts in the 'Host' column (i.e. no wildcards) and specific
>databases in the 'Db' column. Further, all rows in all privilege
>columns in the host table contain 'Y'.
>
>I see from reading Paul DuBois' MySQL book that MySQL ANDs
>privileges in the host table with privileges in the db table,
>allowing administrators to revoke particular privileges for users
>connecting from particular hosts.
>
>Can anyone tell me, then, if the host table is currently having any
>effect on permissions? I'm thinking not, as a logical AND of the
>host table 'Y' and the db table 'Y' or 'N' will result in the
>privilege recorded in the db table.
True.
Also, given what you say in the next paragraph, the host table will never even
be consulted.
>
>Also, Paul's book says that the host table is only checked if the
>'Host' column in the relevant client's row in the db table is blank,
>and all rows in the db table contain values in the 'Host' column. So
>on that fact alone, it looks like I can delete all rows in the host
>table without permissions being affected...?
On that fact alone, yes. Perhaps you simply have rows in the host table
because you were experimenting with it at some earlier time?
>
>Just wanted some opinion/advice before I potentially get myself into
>trouble ;-)
You can always back up the tables in the mysql database first. :-)
>
>Thanks in advance,
>Guy.