Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I currently have an alias to connect to a remote server:

alias server='ssh'

I would like to have an alias to connect to this server, and then automatically open mysql terminal.

Currently, I connect to the server and then run:



Is there anything like:

alias serverdb='ssh && mysql'

but to be executed on the remote server?

share|improve this question
up vote 2 down vote accepted

Leave off the &&. It probably will work better if you force a tty as well (the -tt below).

alias serverdb='ssh -tt mysql'
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .