0

I asked this question and doing echo pass | cmd and cmd <<< pass do not work with mysql and another app i tried.

One guy comments that passwords are through the terminal and not stdin, that sounds secure. How do i do that? using bash, .NET or C++?

Community
  • 1
  • 1

1 Answers1

1

Maybe something like the following can help...

expect -c 'spawn mysql -uroot -p; expect assword; send "toor\n"; interact'

...though I'm not sure I understood correctly your question.

Alberto Zaccagni
  • 30,779
  • 11
  • 72
  • 106