Ever needed to restore only one database on a MySQL server and found out you only had one SQL dump containing all databases?

Its quite common to dump all databases in one SQL file (mysqldump --all-databases or -A). But when using multiple databases on one MySQL instance you often need to restore just one of them.

The minimal effort solution:

mysql --one-database desired_db_name < alldatabases.sql

fix!