简体   繁体   中英

How to import multiple dump files to mysql in windows?

I need to import multiple dump files to mysql using windows command prompt.

How can I import files.

mysql -hlocalhost -uroot -proot -P3306 --databases db1,db2<db1.sql,db2.sql

I tried like this but its not working. How can i write this kind of a command in a bat file.

Thanks

use two commands (and I don't think there is a --databases option in mysql, are you confusing that with mysqldump?).

mysql -hlocalhost -uroot -proot -P3306 db1 < db1.sql
mysql -hlocalhost -uroot -proot -P3306  db2 < db2.sql

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM