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.
解决方案
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
Last but not least, please, take into account the @mosh comment:
If all_files.sql is already present, this can result in recursive copy
of the file on itself with no end! Put the result in a separate
directory to be safe.