Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I'm trying to restore a database backup created using mysqldump. If I do:

    $ mysqldump -u ROOT -p DATABASE_NAME < DATABASE.SQL

the database remains empty, even though I get some screen output and the line "Dump completed...", followed by a timestamp. I could not spot any error messages in the output

I made sure I quit MySQL before attempting the restore and I have tried to include the password in the command line, with no success. However, if I try:

    mysql>source /path_to_dump_file/DATABASE.SQL

it works just fine.

Any thoughts?

Many thanks in advance.

share|improve this question
add comment

1 Answer

Try

mysql -u ROOT -p DATABASE_NAME < DATABASE.SQL

instead of

mysqldump -u ROOT -p DATABASE_NAME < DATABASE.SQL
share|improve this answer
    
That did the trick, thanks a bunch! –  taioba Dec 3 '13 at 14:01
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.