title: How to complete remote mysqldump using pem file?
body: <p>I've mysql server setup in remote server. I can access it using pem file through workbench using connection method as ssh over IP. I want to take backup of one of the DBs from my remote server.</p>
  
  <p>I know, I can use following command to do remote mysqldump,</p>
  
  <pre><code>mysqldump -P3306  -h192.168.1.101 -uroot -ppassword database &gt; /root/user/my.sql
  </code></pre>
  
  <p>But, I don't have password for the mysql server. I use .pem file for authenticating. So, how do I run mysqldump command?</p>
  
  <p><strong>Edit 1</strong>:
  I tried following command</p>
  
  <pre><code>ssh -i ~/.ssh/my.pem -f -L3310:localhost:3306 ubuntu@&lt;server-ip&gt; -N
  </code></pre>
  
  <p>But couldn't succeed. It throws following error,</p>
  
  <blockquote>
    <p>REMOTE HOST IDENTIFICATION HAS CHANGED!</p>
  </blockquote>
  
  <p>So, I tried <a href="https://stackoverflow.com/questions/8654064/ubuntu-ssh-warning-remote-host-identification-has-changed">this</a>. But same error. :(</p>