title: How to download sql database (apache server) to local using terminal?
body: <p>I'm looking for downloading my sql database from a remote server to my local machine.</p>
  
  <p>I used scp command like that :</p>
  
  <pre><code>scp -r user@ip:/var/lib/mysql/mydatabase .
  </code></pre>
  
  <p>It works, but I have lot of files (related to tables in my DB I suppose) : db.opt, files in .frm, .MYD, and .MYI</p>
  
  <p>I tryed to copy my files to a new database folder in MAMP (to test the db), but when I watch my db in PhpMyAdmin I can see only one table :/</p>
  
  <p>Is there a better way to download directly a sql database from server to local with terminal ?</p>
  
  <p>Thanks a lot for your help guys</p>