> 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