The wildcard characters “%” and “_” can be used in the Host and Db columns of either table. These have the same meaning as for pattern-match
Granting privileges has issues if the database name contains an underscore.
If the database privileges have been defined on the mysql command line or in pma myadmin the underscores are escaped so that an exact match of the database name applies.
eg.
GRANT select on my\_db
.* TO 'user'@'host'
DbForge does not escape the _ character and creates a new privilege:
GRANT INSERT on my_db
.* TO 'user'@'host'
If the 'my_db' escaped SELECT privilege is present then the INSERT privilege created by dbForge is ignored.
The underscores in database and host names should be escaped out by dbForge when it genereates GRANT and REVOKE statements.
See below:
The wildcard characters “%” and “” can be used in the Host and Db columns of either table. These have the same meaning as for pattern-matching operations performed with the LIKE operator. If you want to use either character literally when granting privileges, you must escape it with a backslash. For example, to include the underscore character (“”) as part of a database name, specify it as “_” in the GRANT statement.