Query from 1st domain and insert in 2nd domain
Your GRANT statement seems incorrect.

GRANT select ON `database-name.tableA`.* TO 'userB'@'localhost';


This grants the SELECT privilege on all tables (*) in a database called "database-name.tableA".  

The correct statement would be this:

GRANT select ON `database-name`.`tableA` TO 'userB'@'localhost';


Since "database-name.tableA" isn't a valid database, userA can't possibly have permission to access it.  When a user tries to grant a permission to another use, the first user must have the privilege they are trying to give to another user, and the first user must have the GRANT OPTION.

You may be asking, "why doesn't the error message tell me there's no such database?"

The reason is because of security.  If you don't have permission to access an object, then you also, in most cases, don't have permission to know whether that object exists.  If the error message told you the object didn't exist, it would be giving you information that you aren't entitled to know.