--- Chris Boget <[EMAIL PROTECTED]> wrote:
> 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".


It knows exactly where the command ends and the input
begins. It is the < symbol. :-)

Also, in your example (which strays from the poster's
example), the_dump_file.sql is simply executed by mysql
once you provide the password (which it prompts for). It
does not try to use it for the password as you seem to be
thinking.

Anyway, the reason the poster wrote it like this:

mysqldump -uroot -p > the_dump_file.sql

is so that the output of mysqldump (the dump file) is sent
to the_dump_file.sql rather than stdout.

Chris

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to