title: How to copy a database using HeidiSQL?
body: <p>I have a local installation of MariaDB on a Windows XP.<br/>
  I created an empty database <code>db_y</code> which I wanted to populate with the tables of the database <code>db_x</code> which I exported as a dump-file from  a MySQL-instance (with HeidiSQL).<br/><br/> When I imported the dump-file db_x.sql into the the MariaDB instance:</p>
  
  <pre><code>c:\ &gt; mysql -u root -h localhost -p db_y &lt; "X:/archive/db_x.sql"
  </code></pre>
  
  <p>I got the following:</p>
  
  <pre><code>- MariaDB-inst
      +db_x  
      +db_y
  </code></pre>
  
  <p><code>db_y</code> remains empty and <code>db_x</code> from the dump-file was added (db_x is the database name of the original database I exported). <br/><br/>What I have to do to get the desired database name?<br/> I thought I could change the database name in the db_x.sql file but I didn't want to open such a large file.<br/> Can I change the import command above in such a way that it change the database name? <br/>
  I'm also interested in this kind of solution:</p>
  
  <pre><code>CREATE DATABASE y FROM DATABASE x
  </code></pre>
  
  <p>Is something like this possible?<br/>
  In the net I find the solution RENAME DATABASE which was not recommended and ALTER DATABASE db_x UPGRADE DATA DIRECTORY NAME
  but sincerely, I preferred to create a new database with the new name.
  Thanks for any help.</p>