1

I often keep a shell open to a remote server where I'm spending a lot of time in mysql. Exiting mysql and logging back in seems like a pain I shouldn't have to deal with if I just want to run a sql file.

When I'm running MySql from the command line, how can I run a dump file?

Right now, I'm using the same approach outlined in this post.

1 Answer 1

1
mysql> use db_name;
mysql> source backup-file.sql;

You may want to take a look at this answer: https://stackoverflow.com/a/17666285

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.