Reputation: 11191
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.
Upvotes: 1
Views: 1506
Reputation: 11
mysql> use db_name;
mysql> source backup-file.sql;
You may want to take a look at this answer: https://stackoverflow.com/a/17666285
Upvotes: 1