In sqlcmd, you can connect to a different server by this command:
:connect MyServer
The above command will attempt to use integrated / Windows Active Directory authentication. To use traditional Sql Server authentication, use this instead:
:connect MyServer -U MyLogin
You can do the same kind of thing in Oracle Sql Plus by using this command:
conn[ect] MyLogin@OracleSID
For mysql command line, use this:
connect -h MyServer -u MyLogin -p
That is assuming that you are allowed to login to the MySql server from whereever you are now.