You may determine the ports used for accessing the dbs, however those ports must be the ones that the dbs use. (SQLyog connects to the db itself!!!!) You may try tunneling applications, but those won't help too much either – a port must be opened anyway. If it is possible, then use firewall rules to allow only specified machines to connect to that port.