Additional database connections to switch quickly from local to remote host

I always work before on localhost and only when I finished upload on the remote hosting.
Is possible to settings two database connections to switch quicky from the db local to that on the remote host?

The function is the same used from WebAssist:

The correct database to use should be detected from the domain setting in the “remote web server url” (if there are two db connections, otherwise the db is loaded automatically with the unique one).

I create the same settings - database name, user and password - for both local and remote MySQL databases so switching between the two isn’t an issue. I daresay this isn’t always an option, but if it is, it’s an easy solution.