How to connect to remote MySQL from a specific IP?
Let me answer in more formatted form:


MySQL server do not manage client ip on server, and not manage outgoing on client. Server could select IP address for listen only.


Server just compare client IP with permission tables and allow or reject access.
I do not know method how to tell mysql client (including library to use dedicated outgoing ip).

what You can do:


use wildcards, like - user@192.168.12.%
use domain names, like - user@serverB.yourdomain.com


Wildcard make list of IP addresses wider than necessary, but at the same time using DNS resolving:


Slowdown performance under high loading
Could completely crash work with may network related issues


You can combine wildcard + firewall rules for reduce number of allowed IP.