Script to (1) log into remote box, (2) connect to MySQL dbjdolitsky.blogspot.com 1 pointjdolitsky13 years ago1 commentSaveHideCopy link On HNComments−lutusp13yWhat's the point of all this complexity? Since the system already has and uses SSH, why not do it in one line? # ssh hostname "echo 'use db; show tables' | mysql -p(password)" Or, for a remote, interactive MySQL session that prompts for a password: # ssh -t hostname mysql -p The linked content is overkill.
Comments
What's the point of all this complexity? Since the system already has and uses SSH, why not do it in one line?
Or, for a remote, interactive MySQL session that prompts for a password: The linked content is overkill.