Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mySQL 1046 error when importing wordpress database

I'm moving a locally developed wordpress site to a client's server so I'm trying to export the local database and import it to the server. I exported the .sql file according to the instructions here http://codex.wordpress.org/Backing_Up_Your_Database but I keep getting this error when importing:

DROP TABLE IF EXISTS `wp_commentmeta` ;

MySQL said: Documentation
#1046 - No database selected 

Any help very much appreciated. Thanks!

like image 587
HandiworkNYC.com Avatar asked Apr 25 '10 11:04

HandiworkNYC.com


1 Answers

Like the two other answers say: I wasn't importing the backup file to a particular database. I had to create a new database and upload the file to that, and it worked fine.

like image 146
HandiworkNYC.com Avatar answered Sep 28 '22 12:09

HandiworkNYC.com