简体   繁体   English

如何在Windows中将多个转储文件导入mysql?

[英]How to import multiple dump files to mysql in windows?

I need to import multiple dump files to mysql using windows command prompt. 我需要使用Windows命令提示符将多个转储文件导入mysql。

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. 我该如何在bat文件中编写这种命令。

Thanks 谢谢

use two commands (and I don't think there is a --databases option in mysql, are you confusing that with mysqldump?). 使用两个命令(我认为mysql中没有--databases选项,您是否将其与mysqldump混淆了?)。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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