To create a connection that connects to the remote MySQL server, you first need to configure the Testing Server settings in the site definition to connect to the remote site through FTP.
The DB Connection relies on the testing server settings. if the testing server settings are set to use the local testing server, the Database connection will be made to the local database server. if you set the Testing server settings to connect to the remote server, the database connection will connect to the remote server.