I have MySQL password saved on a file `foo.php`, for example `P455w0rd`, when I try to use it:

    $ cat foo.php | grep '$dbpwd=' | cut -d '"' -f 2 | mysql -U root -p mydb -h friendserver
    Enter password: (holds)

    $ echo P455w0rd | mysql -u root -p mydb -h friendserver
    Enter password: (holds)

Both option still ask for password, what's the correct way to send password from `stdin`?