phpmyadmin - localhost.sql import - #1046 - No database selected
<p>I have an old backup of some localhost databases (localhost.sql), which needs to be imported into PhPMyAdmin on a Windows 7 machine with XAMPP installed.</p>

<p>When I try to import localhost.sql (containing multiple databases) in PhPMyAdmin, I get the following error:</p>

<p><strong>#1046 - No database selected</strong></p>

<p>With a single database, you would simply create a new database with the same name and import to that. As this is an old backup, I am not able to recreate the export and I also don´t know the database names that are inside localhost.sql.</p>

<p>Is there a way to recover this?</p>