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 .
mysql> use db_name;
mysql> source backup-file.sql;
You may want to take a look at this answer: https://stackoverflow.com/a/17666285
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.