You need a user for each database.
SQLYog can make users for each database.
Open SQLYog as root.
Open the user manager.
Create dba_user@localhost and assign a password.
Select DatabaseA in the db pane.
Assign all relevant privs for this user.
Save changes.
Do the same again for dbb_user, and select DatabaseB and assign privs.
Save changes.
Now dba_user will only be able to see databaseA,
and dbb_user will only be able to see databaseB.
To do the same on the mysql commandline.
GRANT ALL on databaseA.* to 'dba_user'@'localhost' identified by 'user_a_pass';
GRANT ALL on databaseB.* to 'dbB_user'@'localhost' identified by 'user_B_pass';
FLUSH PRIVILEGES;
Good luck,
Barry.