: How do I solve this error when importing MySQL databases into phpMyAdmin? As part of a system rebuild of my local machine, I have exported all of my MySQL databases using the Export tab in
As part of a system rebuild of my local machine, I have exported all of my MySQL databases using the Export tab in phpMyAdmin. The result is one large file containing each database and their respective tables.
My setup is a MacBook running MAMP 3 Pro
Upon trying to restore the databases, I am running into a problem where phpMyAdmin seems to want the each of the databases to be created first. A typical error message is:
Error
SQL query:
-- Database: myfirstdatabase
1046 - No database selected
I have clearly gone about backing up my databases in the wrong way, but is there a method for easily recovering from this situation?
More posts by @Cooney921
1 Comments
Sorted by latest first Latest Oldest Best
When exporting, phpmyadmin has an option (under the "custom" configuration) to "CREATE DATABASE / USE statement". If you didn't check that, then your export file won't create the databases.
As far as recovering, you'll need to create each database manually. Not the tables and schemas though, just create the database itself and your existing default export format should create the tables for you.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.