title: MySQL : Copy all databases from one server to another
body: <p>I am working on migrating one of our project which requires MySQL to another server. I am looking for a way to migrate all the created databases by the users to another server. For starting, I tried out to move only one database, but it's not working. </p>
  
  <p>Attempt :</p>
  
  <pre><code>mysqldump db_name | mysql -h root@migration_server.com target_db(same name);
  </code></pre>
  
  <p>Error :</p>
  
  <pre><code>ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'command as above' at line 1
  </code></pre>
  
  <p>What am I doing wrong? Anything on the 2nd server I need to set or something else. Thank you. </p>