title: Exporting/Importing a WordPress database to reproduce a site on another machine
body: <p>I am using WP 4.8 and using MAMP server. 
  Exporting Database:</p>
  
  <p>I exported the database using the following steps:
  -Select folder
  -Select export tab
  -After Clicking the radio button for 'Custom', I select 'Save output to file'(I leave the defaults)</p>
  
  <p><a href="https://i.stack.imgur.com/8yxwL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8yxwL.png" alt="MAMP screenshot"></a></p>
  
  <p>Importing the DB (on the other machine):
  (after decompressing a new wp site-naming it -and saving the wp-config.php)</p>
  
  <p>-Open MAMP and choose the 'Import' Tab and select the backed up SQL file and press 'GO'</p>
  
  <p>The following error:</p>
  
  <pre><code>Error
  
  SQL query:
  
  --
  -- Database: `MyAceEL_db`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `wp_commentmeta`
  --
  
  CREATE TABLE `wp_commentmeta` (
    `meta_id` bigint(20) UNSIGNED NOT NULL,
    `comment_id` bigint(20) UNSIGNED NOT NULL DEFAULT '0',
    `meta_key` varchar(255) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
    `meta_value` longtext COLLATE utf8mb4_unicode_520_ci
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
  
  MySQL said: Documentation
  #1046 - No database selected 
  </code></pre>
  
  <p>So, either the problem might be either my export options or possibly an older version of MAMP on the laptop I'm trying to duplicate the site onto.</p>
  
  <p>Any help would be greatly appreciated.</p>
  
  <p><a href="https://i.stack.imgur.com/lQuru.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lQuru.png" alt="import screen"></a></p>