I have dir with a lot of .sql files. I want to import them all at once when creating the database. Is it possible without doing it one-by-one?
I already tried
mysql -u user -p Database < *.sql
but no luck.
You can do it so:
cat *.sql | mysql -u user -p Database
OR
cat *.sql >/tmp/all.sql
mysql -u user -p Database < /tmp/all.sql
rm /tmp/all.sql
cat is the solution here as it will combine all the .sql files together into one.