tags:

views:

24

answers:

1

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++?

+1  A: 

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