The db and host tables grant database-specific privileges. A blank User value in either table matches the anonymous user. The db table is sorted on the Host , Db and User scope fields, and the host table is sorted on the Host and Db scope fields. This is similar to db table sorting, although since only the Host field may contain wildcards, the sorting is simpler. The request verification process is described below.
Access is granted if the entry allows the requested operation and denied otherwise.
For example, if you want to execute mysqladmin shutdown but your user table entry doesn't grant the shutdown privilege to you, access is denied without even checking the db or host tables. If the entry allows the requested operation, access is granted. Host and User are matched to the connecting user's hostname and MySQL user name. The Db field is matched to the database the user wants to access. If there is no entry for the Host and User , access is denied.