Chococroc Chococroc - 6 months ago 27
SQL Question

How to Import Several .sql files at once into a mysql Database?

I have several

.sql
files and I want to import all of them at once into a MySQL database.

I'm using
WAMP
, and until now:

I go to PHPMyAdmin, then I access to the database, I click
"import"
and I select a file and import it. But as I have more than 10 files, I would like to know if there is a better way to do it, something like one file which imports the other files or similar.

I would like solutions without installing additional programs in my computer.

Thank you in advance.

Answer

Thanks BlackCharly, I found how to do it in Windows, open a terminal go to content folder and write:

copy /b *.sql all_files.sql

This concate all files in only one, making it really quick to import with PhpMyAdmin

In linux, as BlackCharly says:

cat *.sql  > all_files.sql
Comments