That's not how it works.
The rights are entered as seperate records in a rights-table. Every row in the users table in the 'mysql' database acts as a single right.
These records can only give access, they cannot take it away. When a right is revoked, the record that granted that right is deleted. It is not possible to enter a record that denies access. Access is always denied unless it is specifically granted by a record in the rights table.
In your case you granted the right to ., but now you want to revoke the right to a single database. This cannot be done because there is no record that specifically gives rights to that database.
The user has rights to ., which includes the database you want to revoke the rights for, but there is no specific right to just that single database, so you cannot revoke it.
The only way around it is to grant permissions on just the databases you want to give access to. If you do not grant permission to the 'mysql' database, the user will not have access to it.