title: How to export database through putty?
body: <p>I have large db so I want to export db by using putty.</p>
  
  <p>Step -1 - connect to mysql</p>
  
  <pre><code>mysql -u username -p -- DBname
  </code></pre>
  
  <p>Then it will ask to input password. After putting password now my console is ready to execute mysql command</p>
  
  <p>Step - 2 - to export db, I have tried</p>
  
  <pre><code>mysql -u username -p --dbanme &gt; path/folder.sql
  </code></pre>
  
  <p>it's not working, I get error:</p>
  
  <blockquote>
    <p>showing 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  mysql -u griar_riar -p --griar_riar > path/folder.sql</p>
  </blockquote>
  
  <p>I have also tried:</p>
  
  <pre><code>mysql -u username -p -- dbname &gt; /path/folder.sql
  
  mysql -u username dbname &gt; /path/folder.sql
  </code></pre>
  
  <p>I have also tried mysqldump:</p>
  
  <pre><code>mysqldump -uuser_name -ppassword -hhost_name db_name &gt; /path/folder.sql
  </code></pre>
  
  <p>Please help me</p>
  
  <p>Thanks</p>