title: Convert and import sql file into postgresql
body: <p>I want to migrate database from mysql to postgresql. So, first did the <code>mysqldump</code> with this command</p>
  
  <pre><code>mysqldump -u root -p --compatible=postgresql --default-character-set=utf8  databasename &gt; output.sql
  </code></pre>
  
  <p>Then i upload the output.sql to host and import the sql file using below command</p>
  
  <pre><code>psql -U root -d databasename -f /home/test/output.sql
  </code></pre>
  
  <p>But i got error when i try to import</p>
  
  <pre><code>ERROR:  syntax error at or near "KEY"   
  ERROR:  syntax error at or near "UNLOCK"  
  ERROR:  syntax error at or near "("       
  invalid command \n        
  invalid command \'&gt;&lt;/script&gt;       
  invalid command \";s:2:          
  invalid command \',        
  invalid command \']       
  Query buffer reset (cleared).
  </code></pre>
  
  <p>The size of database that I dumped is 7.5gb.</p>