cupboy;10883154 wrote:"command prompt" is the key to the whole problem. I was inserting the command into a batch file. That worked ok for the backup, but not for the restore. Doing it directly using the command prompt works fine. Thanks for the reply.
Not sure if I'm misunderstanding you or not, but it sounds like you say it still doesn't work in a batch file. My tests show the contrary...
syntax for creating dump file
mysqldump -h hostname -u username -ppassword test > foo.sql
foo.sql (edits to dumpfile to create and use a new database, for verification purposes)
CREATE new_test;
USE new_test;
(rest of dump file)....
bar.bat (batch file)
mysql -h hostname -u username -ppassword < foo.sql
Then launching the batch file executes every thing just fine.