Reputation: 47
Sql file to mysql database using shell script.
I have ten more .sql
files. But all of the .sql
files are imported into same database.
The .sql
files are in .gz
format.
Upvotes: 0
Views: 1922
Reputation: 7866
bash:
for sql_file in *.sql; do mysql db_name < $sql_file; done
(Assuming you wish to import all the sql files in the current directory)
Upvotes: 2