dynamic connections will not work in this way.
dynamic connections relies on the URL in the address bar to determine which connection details to use
you need to use a static connection to connect to the other server, not a dynamic connection.
This may or not be possible depending on the MySQL Server.