MySQL restore multiple databases

Emil Edeholt emil at knmedical.se
Sun Feb 25 22:00:11 UTC 2007


Hello!

I hope this is not off topic. When I restore one database from an sql 
file I run:

mysql --user=username --pass=password --host=dbserver database < 
/path/file.sql

But now I have one big sql file with all my databases and a CREATE 
DATABASE for every database.

How do I import this sql file into mysql so all databases are restored? 
(So I won't have to update my backup script everytime I add a database 
in mysql).

I hope I explained this clearly enough... Thanks for your time!

Best regards Emil




More information about the ubuntu-users mailing list