Server Fault is a question and answer site for system and network administrators. 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

A MySQL cloud server only allows remote access to a certain server (in this example, 11.22.33.44). Running the following commands from the terminal is verified to work:

  1. ssh -p 40000 user@11.22.33.44
  2. mysql -u dbuser -p -h example.com

But when combining them into command (in order to assign it to an alias), it doesn't work:

ssh -p 40000 user@11.22.33.44 "mysql -u dbuser -p -h example.com"

No error message is displayed, and the terminal never outputs a returned response.

Any ideas?

share|improve this question
up vote 2 down vote accepted

Try adding a "-t" to your ssh command (as in ssh -t -p 40000). That lets SSH interpret TTY commands like "stop echo for typing in the password", etc.

share|improve this answer
    
Thank you! Worked great – Kyle Feb 17 '13 at 3:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.