I dumped from Craft my database from server A and am trying to install it to a fresh copy of Craft on server B.

I've got Craft up and running, and when I try importing my Craft SQL file in PHPmyAdmin, I get an error every time:

craft error

Is there something I need to setup in Craft regarding asset files before my import will work?


MySQL exports only include the tables, not the database settings. You need to create a database first, open it and then import the tables.

  • I created a database on my new server, and then went to import the sql file into it, and still got this error.
    – kingkelly
    Feb 10 '18 at 3:12
  • The error says no db selected though.
    – carlcs
    Feb 10 '18 at 9:32

This caught me out too.

In PhpMyAdmin, click Databases tab, click the database you wish to import into, then Import tab.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.