program read that file and interpret the data in the file as the password, if you have
a proper password set and use the -p option (even with a < operator) it will still ask
you for a password.
On Thu, 2003-01-16 at 10:33, Chris Boget wrote:
> But why it is ok when i use system("mysqldump -uroot -p >my_dump_file.sql")?
As alluded to by the last user (who got the command wrong), when you
do:
system("mysql -uroot -p < the_dump_file.sql")
it doesn't know where the command ends and the input begins. So what's
going on is that the command thinks that the password is coming from the
"the_dump_file.sql". So while you think that is the data you are passing to
the "mysql" executable, the system call thinks it's what you are passing
to the "-p" option.
Try doing this instead and see if it doesn't work:
system( "cat the_dump_file.sql | mysql -uroot -p" );
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
-- Adam Voigt ([EMAIL PROTECTED]) The Cryptocomm Group My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc |
signature.asc
Description: This is a digitally signed message part