0

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?

Kyle Cureau
  • 1,537
  • 3
  • 11
  • 15

1 Answers1

2

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.