Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to move a Wordpress table from my old server to my new one and I am receiving this error: SQL query:

-- Database: `username_film`
-- --------------------------------------------------------
-- Table structure for table `wp_commentmeta`
CREATE TABLE IF NOT EXISTS `wp_commentmeta` (
`meta_id` bigint( 20 ) unsigned NOT NULL AUTO_INCREMENT ,
`comment_id` bigint( 20 ) unsigned NOT NULL DEFAULT '0',
`meta_key` varchar( 255 ) DEFAULT NULL ,
`meta_value` longtext,
PRIMARY KEY ( `meta_id` ) ,
KEY `comment_id` ( `comment_id` ) ,
KEY `meta_key` ( `meta_key` ) ,
KEY `disqus_dupecheck` ( `meta_key` , `meta_value` ( 11 ) )

MySQL said: Documentation
#1046 - No database selected 

So, on my old server, I went into phpmyadmin and exported the wordpress table (not the entire server database) in SQL format, then went into my new server and uploaded it through import. What am I doing wrong? Please note that I am not very experienced with database administration so details in answers would be very helpful!

share|improve this question
You have to create and/or use a specific database where this table is supposed to be imported. – Mattias Ahnberg Jan 23 '12 at 13:41
That is very correct, I realised my mistake minutes after I posted this. Feel free to make this an Answer and I will mark it as correct :) – Peetrus Jan 23 '12 at 13:47
up vote 1 down vote accepted

You have to create and/or use a specific database where this table is supposed to be imported!

share|improve this answer
Tack sa mycket! – Peetrus Jan 23 '12 at 13:57
I thought that might be rude.. It's actually Thanks very much in Swedish :P – Tom O'Connor Jan 23 '12 at 16:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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