Ubuntu – Restoring MULTIPLE MySQL databases from one file at the command line

MySQLphpmyadmin

I have exported all my databases to a file using phpMyAdmin.

Unfortunately I don't have a working phpMyAdmin in my destination system.

How should I restore all of them at once using one line command?

Best Answer

Why don't you concat all the files into one single file and import/restore using

mysql -u username -p < dump.sql

Create one file using

mysqldump -u username -p --all-databases > dump.sql
Related Question