Home >Database >Mysql Tutorial >mysql批量导入sql文件_MySQL

mysql批量导入sql文件_MySQL

WBOY
WBOYOriginal
2016-06-01 13:41:48901browse

bitsCN.com 有180个sql备份文件,批量导入
首先新建一个main.sql,然后在main.sql文件里面这么写:
 
source C:/sql/1.sql;
source C:/sql/2.sql;
source C:/sql/3.sql;
....
 
 
编辑好后,再source main.sql,mysql就会稀里哗啦的给你自动的批量导入了。
 
对于如何批量写入sql文件的路径,你可以用cmd命令,比如dir backup/  /b/s>main.sql,然后再在每行开头加上source就行鸟。
bitsCN.com

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn