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 the sorting is simpler because only the Host field may contain wild cards. 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. The Host and User fields 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.